POV-Ray : Newsgroups : povray.general : Colors of the rainbow : Re: Colors of the rainbow Server Time
30 Jul 2024 00:23:48 EDT (-0400)
  Re: Colors of the rainbow  
From: ruy
Date: 13 Apr 2010 04:35:01
Message: <web.4bc42c08db1f0f0260ff6bf40@news.povray.org>
Ah, so Hue varies from 0 to 360 degrees while Saturation and Value vary from 0
to 1. That's a very interesting piece of information. Exactly what I needed to
hear, Alain, merci!

It worked perfectly.

Ruy

Alain <aze### [at] qwertyorg> wrote:
>
> Change your code to:
> #local Hue = (Mx-Cr)/Mx*360;
> // Scale to a full circle on the colour wheel
> // Adjust if you want to use a smaller or larger range
> texture {
>           pigment{rgb CHSV2RGB(<Hue, 1.0, 1.0>)}
>          }
>
> OR change your pigment to:
> pigment{rgb CHSV2RGB(<((Mx-Cr)/Mx)*360, 1.0, 1.0>)}
>
>
>
> Alain


Post a reply to this message

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