Archived

This topic is now archived and is closed to further replies.

Color selection formula

This topic is 5146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i am trying to create a color-picker object in Flash. my question is not Flash specific coz its about the color selection itself. This is how its supposed to work: There''s a square box of gradients with all the rainbow -like colours horizontally and intensity change vedrtically. Its just like the colour picker object within Flash itself. Handling intensity is the easy part. I''m just having problems coming up with a formula that can extract the proper colour depending on the position the user clicks. Rite now, i''m using sin and cos formulas and they work to a certain degree but the slopes of these formulas are quadratic in nature. Observing the hexadecimal values for RGB representation, theres a fixed linear increase/decrease of values at specific intervals for each channel. sin and cos seem to be not very useful in that case. anyone has a great way of handling this? i tried google but no proper luck there. Thanx in advance!

Share this post


Link to post
Share on other sites
What Boops is getting at will make more sense with an examination of the color spaces that each model produces. HSL (Hue-Saturation-Luminence) lends itself more readily to a two dimensional representation than does RGB.

Share this post


Link to post
Share on other sites