POV-Ray : Newsgroups : povray.unofficial.patches : Announce: SkyPOV 0.1 : Re: color definition (Re: Announce: SkyPOV 0.1) Server Time
30 Jul 2024 22:24:28 EDT (-0400)
  Re: color definition (Re: Announce: SkyPOV 0.1)  
From: Chris Huff
Date: 13 Nov 2000 07:27:08
Message: <chrishuff-842D8F.07271913112000@news.povray.org>
In article <kn8v0tkg6h7ddc5j1q81ehvclvanuq06v1@4ax.com>, Peter Popov 
<pet### [at] usanet> wrote:

> I think it should be enough if colors are kept the way they are and
> there are introduced parser functions to convert a 3D vector to and
> from hsb and rgb. This will keep backwards compatibility and will
> offer the user more power. I am not sure how useful this will be,
> though, as everything here mentioned can be done with simple macros.

It would be very simple to do once you have the code for converting 
between the color systems. I can think of two possible ways of doing the 
syntax:
1: Separate rgb_to_hls(), rgb_to_cmy(), rgb_to_hsv() functions.
2: Three functions: rgb_to(COLOR_SYS, COLOR), to_rgb(COLOR_SYS, COLOR), 
convert_color(COLOR_SYS_SRC, COLOR_SYS_DEST, COLOR). This has the 
advantage of being simpler when there are a lot of color systems.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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