POV-Ray : Newsgroups : povray.general : Feature request: Native support for HSL color space : Re: Feature request: Native support for HSL color space Server Time
31 Jul 2024 18:22:46 EDT (-0400)
  Re: Feature request: Native support for HSL color space  
From: PoD
Date: 23 Oct 2006 07:33:03
Message: <pan.2006.10.23.11.32.16.817738@internode.on.net>
On Sat, 21 Oct 2006 20:21:28 -0700, Tim Attwood wrote:

>> I would like to request that POV-Ray natively support color spaces other
>> than RGB (namely HSL) without having to use conversion formulas and all
>> that.
> There's macros in colors.inc for that...
> CHSL2RGB( )
> 
> I'm not sure what syntax you would sugest, you'd need a
> hsl keyword similar to rgb?
> pigment {color hsl <1,1,1>} // like this?
> 
> I don't care for the look of CHSL2RGB() but it can
> be redefined
> #macro hsl(A) CHSL2RGB(A) #end
> Then you'd end up with
> pigment {color hsl(<1,1,1>)}
> which isn't much different.

Still not the same as having native support for hsl.
If I specify a colour_map with
[0 rgb<1,0,0>]
[1 rgb<0,1,0>]
then the colour at 0.5 will be rgb<0.5,0.5,0>

however
[0 hsl<0,1,1>]
[1 hsl<1,1,1>]
should give hsl<0.5,1,1> at 0.5 which still has full saturation and
luminance.

This would be very useful to have, though I can't see it happening in the
near future.

-- 
PoD.


Post a reply to this message

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