POV-Ray : Newsgroups : povray.general : HLS in color_maps? Server Time
1 Nov 2024 05:19:35 EDT (-0400)
  HLS in color_maps? (Message 1 to 5 of 5)  
From: Mike Horvath
Subject: HLS in color_maps?
Date: 22 Jan 2016 18:53:12
Message: <56a2c0e8$1@news.povray.org>
I know there is a macro to convert HLS colors into RGB colors. But can 
this be done in color_maps?


Mike


Post a reply to this message

From: clipka
Subject: Re: HLS in color_maps?
Date: 22 Jan 2016 19:05:43
Message: <56a2c3d7@news.povray.org>
Am 23.01.2016 um 00:53 schrieb Mike Horvath:
> I know there is a macro to convert HLS colors into RGB colors. But can
> this be done in color_maps?

Sure, why not.

Note however that this will /not/ give you colour interpolation in HLS
space.


Post a reply to this message

From: Mike Horvath
Subject: Re: HLS in color_maps?
Date: 22 Jan 2016 19:17:05
Message: <56a2c681$1@news.povray.org>
On 1/22/2016 7:05 PM, clipka wrote:
> Am 23.01.2016 um 00:53 schrieb Mike Horvath:
>> I know there is a macro to convert HLS colors into RGB colors. But can
>> this be done in color_maps?
>
> Sure, why not.
>
> Note however that this will /not/ give you colour interpolation in HLS
> space.
>

I meant being able to go from hls <0,1/2,1> to hls <1,1/2,1> inside the 
color_map with smooth gradations.

Mike


Post a reply to this message

From: Alain
Subject: Re: HLS in color_maps?
Date: 22 Jan 2016 20:28:07
Message: <56a2d727@news.povray.org>
Le 16-01-22 19:17, Mike Horvath a écrit :
> On 1/22/2016 7:05 PM, clipka wrote:
>> Am 23.01.2016 um 00:53 schrieb Mike Horvath:
>>> I know there is a macro to convert HLS colors into RGB colors. But can
>>> this be done in color_maps?
>>
>> Sure, why not.
>>
>> Note however that this will /not/ give you colour interpolation in HLS
>> space.
>>
>
> I meant being able to go from hls <0,1/2,1> to hls <1,1/2,1> inside the
> color_map with smooth gradations.
>
> Mike

Copy the macro in your scene.
Build your colour_map with a loop that goes through the hue values in 
relatively small steps, say 0.01 to 0.03.
Use the macro to convert each values to the appropriate RGB values.

That way, the disparity between the two colour spaces are kept small 
enough so that they are not perceptible.

The initial copy of the macro is done to speed up the parsing. 
Otherwise, you need to read the whole source file each times the macro 
is used.


Post a reply to this message

From: Mike Horvath
Subject: Re: HLS in color_maps?
Date: 22 Jan 2016 22:19:01
Message: <56a2f125$1@news.povray.org>
On 1/22/2016 8:28 PM, Alain wrote:
> Le 16-01-22 19:17, Mike Horvath a écrit :
>> On 1/22/2016 7:05 PM, clipka wrote:
>>> Am 23.01.2016 um 00:53 schrieb Mike Horvath:
>>>> I know there is a macro to convert HLS colors into RGB colors. But can
>>>> this be done in color_maps?
>>>
>>> Sure, why not.
>>>
>>> Note however that this will /not/ give you colour interpolation in HLS
>>> space.
>>>
>>
>> I meant being able to go from hls <0,1/2,1> to hls <1,1/2,1> inside the
>> color_map with smooth gradations.
>>
>> Mike
>
> Copy the macro in your scene.
> Build your colour_map with a loop that goes through the hue values in
> relatively small steps, say 0.01 to 0.03.
> Use the macro to convert each values to the appropriate RGB values.
>
> That way, the disparity between the two colour spaces are kept small
> enough so that they are not perceptible.
>
> The initial copy of the macro is done to speed up the parsing.
> Otherwise, you need to read the whole source file each times the macro
> is used.


I guess that's a workaround until I decide to switch to POV-Ray 3.7.1.


Mike


Post a reply to this message

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