POV-Ray : Newsgroups : povray.general : color conversion Server Time
4 Jul 2025 14:30:11 EDT (-0400)
  color conversion (Message 1 to 7 of 7)  
From: kurtz le pirate
Subject: color conversion
Date: 26 Jun 2025 12:53:07
Message: <685d7af3@news.povray.org>
Hello everybody,


It seems to me that someone posted a method of converting hsv to rgb 
using only functions.



I can't find it or I've had a dream ?

Thank you for your memories ;)




-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message

From: MichaelJF
Subject: Re: color conversion
Date: 26 Jun 2025 14:23:01
Message: <685d9005$1@news.povray.org>
Am 26.06.2025 um 18:53 schrieb kurtz le pirate:
> 
> Hello everybody,

colors.inc:

// Converts a color in HSV color space to a color in RGB color space.
// Input:  < Hue, Saturation, Value, Filter, Transmit >
// Output: < Red, Green, Blue, Filter, Transmit >
#macro CHSV2RGB(Color)
    #local HSVFT = color Color;
    #local H = (HSVFT.red);
    #local S = (HSVFT.green);
    #local V = (HSVFT.blue);
    #local SatRGB = CH2RGB(H);
    #local RGB = ( ((1-S)*<1,1,1> + S*SatRGB) * V );
    <RGB.red,RGB.green,RGB.blue,(HSVFT.filter),(HSVFT.transmit)>
#end


Best regards
Michael


Post a reply to this message

From: Bald Eagle
Subject: Re: color conversion
Date: 29 Jun 2025 08:25:00
Message: <web.68612fa8938293031f9dae3025979125@news.povray.org>
kurtz le pirate <kur### [at] freefr> wrote:

> It seems to me that someone posted a method of converting hsv to rgb
> using only functions.

https://news.povray.org/povray.general/thread/%3C47374beb%241%40news.povray.org%3E/?mtop=257459&moff=18

I wrote my own, but can't find them either.  Bu they ARE somewhere...

- BE


Post a reply to this message

From: kurtz le pirate
Subject: Re: color conversion
Date: 1 Jul 2025 10:02:33
Message: <6863ea79$1@news.povray.org>
On 29/06/2025 14:20, Bald Eagle wrote:
> 
>
https://news.povray.org/povray.general/thread/%3C47374beb%241%40news.povray.org%3E/?mtop=257459&moff=18


Ho yes, Trevor G Quayle of course... but hsl, not hsv.



> I wrote my own, but can't find them either.  Bu they ARE somewhere...

I think I'll get to work on that too



Thank you for your memory.



-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message

From: kurtz le pirate
Subject: Re: color conversion
Date: 3 Jul 2025 13:52:22
Message: <6866c356@news.povray.org>
On 01/07/2025 16:02, kurtz le pirate wrote:
> 
> I think I'll get to work on that too


Finally, I found the time to write my functions for HSL and HSV to RGB 
conversations.

If anyone's interested, I've prepared a small zip (4k) containing the 
library (.inc) and a test sdl (.pov).

Don't hesitate to ask.
In any case, I'll put it on my site.








-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message

From: Bald Eagle
Subject: Re: color conversion
Date: 3 Jul 2025 20:10:00
Message: <web.68671af8938293031f9dae3025979125@news.povray.org>
I found this lurking in an old 3.7 include folder.

Pretty sure it's not mine.
Might be yours.
Might be TOK's or Ingo's, or someone else's.

I'll have to keep looking to see where the heck mine is, and what it's called.

- BW


Post a reply to this message


Attachments:
Download 'color_conversion.inc.txt' (4 KB)

From: kurtz le pirate
Subject: Re: color conversion
Date: 4 Jul 2025 11:30:21
Message: <6867f38d$1@news.povray.org>
On 04/07/2025 02:06, Bald Eagle wrote:
> I found this lurking in an old 3.7 include folder.
> 
> Pretty sure it's not mine.
> Might be yours.
> Might be TOK's or Ingo's, or someone else's.

This is the job of Trevor G Quayle.




> I'll have to keep looking to see where the heck mine is, and what it's called.

Good luck Bill ;)







-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message

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