-
Color manipulation
Hi,
I often use boxes which use 3 colours. They have a base color, which can be anything, preferably quite bright, and fairly colourful.
This is the first colour of the gradient that fills the box. Then second colour is slightly darker, and slightly more saturated. The third colour is further darkened, and further saturated.
My question is, how could I make these 3 colours (assuming the user selects the 'base colour') themselves. I have an image to help anyone visualise this. Any help/discussion really appreciated!
(in case that doesn't show up, http://djave.co.uk/images/hosted/colormanipulation.jpg)
-
You are talking about color in terms of hue, saturation, and value, so you will want to manipulate the color in HSV rather than RGB. You can find RGB->HSV and HSV->RGB algorithms out there (and there's probably an AS3 package with them already).
http://blog.mindfock.com/rgb-to-hexa...ersion-in-as3/
So take the RGB color from the colorpicker or however the user selects it, turn it to HSV, then increase Saturation and Value components a bit, then translate back to RGB. Maybe it's decrease Value. I don't remember.
-
Thank you very much buddy. Will get on this.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|