POV-Ray : Newsgroups : povray.general : Help: Working with color-wheels : Re: Help: Working with color-wheels Server Time
29 Jul 2024 12:19:28 EDT (-0400)
  Re: Help: Working with color-wheels  
From: Alain
Date: 20 Aug 2011 19:04:04
Message: <4e503d64$1@news.povray.org>

> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.