On Wed Feb, 2012, Keith (Gulf Breeze Ortho Lab) keith at
gulfbreezeortholab.com wrote:
Hi All,
I have a problem... If a user selects a color and I put it into a
variable (as RGB), how can I find a shade that is several shades
lighter, and a shade that is several shades darker, also in RGB fo
Seems to me you could add 10% to each of the RGB values by multiplying each by
1.1, then round them up. (A roundUp function can be made by div'ing a value by
itself, then adding the mod of a value by itself and conditionally adding 1 if
the mod is not 0). That would give you the shade lighter. D
Hey Keith,
One site that could help you is Scott Rossi's tactilemedia.com he has some
great tutorials and the 'Color Slider' tutorial should give you all the info
you need to convert your colour data into HSB (HSL), then you can just compare
the brightness values and respond accordingly.
The t
...not sure if this helps but perhaps one way might be to emulate the colour
tools palette, by transforming the RGB values to/from HSB and then vary the
saturation and/or brightness values.
I guess it depends what you mean by the term 'shade'? And of course, how to
transform the values would b
On 15/02/2012 11:15, Keith (Gulf Breeze Ortho Lab) wrote:
I have a problem... If a user selects a color and I put it into a variable (as
RGB), how can I find a shade that is several shades lighter, and a shade that
is several shades darker, also in RGB format?
Here are a few approaches:
http:
Hi All,
I have a problem... If a user selects a color and I put it into a variable (as
RGB), how can I find a shade that is several shades lighter, and a shade that
is several shades darker, also in RGB format?
For example, I put 0,255,64 into myVar. (This color a shade of green.)
Programmatic