views:

30

answers:

1

I would like to know / calculate color codes of N red shadows (N can be 5, 20, or 50, for example).

How could I do this ?

I noticed, for example, that the following gives some red shadows:

  • R = 255, G = B = 0..255
  • R = 0..255, G = B = 0

Is there any known method to calculate shadows ?

+2  A: 

I think it would be easier to generate the shades of a color in HSV color-space. You can choose a base color (hue) and variate the saturation or the value, and then generate the RGB values for the generated colors. There is a nice wikipedia article about the HSL/HSV color space, where you can find the formulas to convert colors from RGB to HSV and back.

Nikolaus Gradwohl
Thanks a lot !!
Misha Moroshko