|
![](/i/fill.gif) |
> Hi folks,
> How can we calculate the complementary color of a given color?
>
> I'm trying to write a macro for calculate the analogous and complementary colors
> for a given value, something like what you get on this page:
>
> http://www.yafla.com/yaflaColor/ColorRGBHSL.aspx
>
> but for the moment I'm blank as working with color wheels in pov-ray rgb
> vectors.
>
> Here are a staple in Spanish to review the theory of colors, the images show the
> relationships between complementary colors.
> http://brizkomania.blogspot.com/2011/01/repaso-basico-la-teoria-del-color.html
>
> Thanks in advance, the pov-ray links to color wheels rusted time ago
>
> B. Gimeno
> Sorry for my syntactic errors automatic translated.
>
>
>
>
>
In the colors.inc file, there is a macro to convert from RGB to HSV. The
hue returned is in degree going from 0 to 360.
Convert your colour from RGB to HSV, add 180 to the hue and convert back
to RGB and you're done. The saturation and brightness will stay the same.
Alain
Post a reply to this message
|
![](/i/fill.gif) |