POV-Ray : Newsgroups : povray.advanced-users : Media and Opposite Colors : Re: Media and Opposite Colors Server Time
30 Jul 2024 16:16:52 EDT (-0400)
  Re: Media and Opposite Colors  
From: Margus Ramst
Date: 28 Sep 1999 08:11:21
Message: <37F0B044.F7DC4429@peak.edu.ee>
Ron Parker wrote:
> >so -
> >
> >rgb<1,1,1> - rgb<1,0,0> = rgb <0,1,1> = opposite color ?
> 
> Exactly.
> 
> Cyan is the opposite of red.

The only problem being when the original colour is not full intensity, i.e.
something like rgb <.5,0,0>

rgb<1,1,1> - rgb<.5,0,0> = rgb<.5,1,1>

which is of course spectrally correct, but much brighter than the original.

I simply use my HSL macros (I've all but abandoned RGB)
This is what I do:

hsl(OriginalHue-0.5, S, L) = hsl(OppositeHue, S, L)

If the original hue is <0.5 add 0.5 instead of subtracting. The brightness of
the colour remains the same, which is especially important in media.

Margus


Post a reply to this message

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