POV-Ray : Newsgroups : povray.general : SVG Recognized colors : Re: SVG Recognized colors Server Time
6 Apr 2026 08:14:06 EDT (-0400)
  Re: SVG Recognized colors  
From: Bald Eagle
Date: 29 Mar 2026 09:15:00
Message: <web.69c9258cd157b00d1f9dae3025979125@news.povray.org>
This reminds me of some similar "named color" projects in the past.

Suggestion:

You output your converted colors as identifier declarations:
#declare Aliceblue = srgb <0.941, 0.973, 1.0>;

However, these are less meaningful and useful from the standpoint of SDL, since
you smoosh everything together.  This is the current problem that we have with
the parser, and every badly-written spreadsheet.

Put all of your colors into an array, and all of the names in another.

Now I can use a #for loop to cycle through the colors, do something with them,
and just use the text as a label.

Or you could use a multidimensional array, splitting up the red, green, and blue
components.  Using nested loops, the colors could be rendered in an rgb cube to
show where colors are clustered, and how similar/different they are.
Or an rgb hexagon.
Or a triangular ternary diagram.
Or a sphere, with rgb being mapped to Theta, Phi, Radius.

Perhaps make them all spheres and connect them in a blob {}

More advanced - a macro could be used to loop through all of the color names
until "Aliceblue" was found, and then return the rgb values as the result.
Otherwise "That color name was not found." and perhaps return the default color.

Also, I recall seeing some very cool python/povray projects that you might enjoy
if you search for them.

- BE


Post a reply to this message

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