Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Color selection from image palette

Author
Message
Hubert BAYRE
7
Years of Service
User Offline
Joined: 21st Oct 2017
Location: France
Posted: 26th Oct 2019 09:02 Edited at: 26th Oct 2019 09:04
For my draw program part i'm searching a way to propose a more interesting color selection... i've this : (limited colors)


So perhaps i could use this picture and next choose the selected r,g,b colors when user touch on it.


But how to determine the selected color from this palette picture ?

Have you some ideas?

Note this is for use with a tablet.

Thanks for your help.

Note :
Special thanks to Paul Harthen for the FloodFill method : https://forum.thegamecreators.com/thread/213305

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th Oct 2019 09:17
this may help

fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th Oct 2019 11:16
This post has been marked by the post author as the answer.
if you want the RGB values separate and don't want to use global variables it can be done like this

fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Hubert BAYRE
7
Years of Service
User Offline
Joined: 21st Oct 2017
Location: France
Posted: 26th Oct 2019 22:53
Many thanks for the idea !
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Oct 2019 22:44
your welcome Im curious what your floodfill Algorithm is like as a basic floodfill in its very basic form looks like
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Hubert BAYRE
7
Years of Service
User Offline
Joined: 21st Oct 2017
Location: France
Posted: 28th Oct 2019 07:29 Edited at: 28th Oct 2019 07:37
In fact post-processing. Image -> memBlock grab Pixels. -> array -> File.

Part of my project :



Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-22 10:18:24
Your offset time is: 2024-11-22 10:18:24