RE: RGB color cube & HLS color cone
- To: mathgroup at smc.vnet.net
- Subject: [mg19747] RE: [mg19706] RGB color cube & HLS color cone
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Wed, 15 Sep 1999 03:53:01 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Dick Phillips wrote:
Has anyone developed code to display a 3D RGB color cube and/or a 3D HLS
color cone? I'd like to be able to rotate, slice, etc. such objects.
I am working on a package that does much of this. The package includes four
functions ColorWheel, ColorPlot, ColorScale, GetColor.
ColorWheel makes a wheel of colors with the specification
Hue[h,s,1]. The colors approach white in the center.
ColorWheel[CenterColor->"Black"] makes a wheel of colors where the colors
approach black in the center.
The lines below make a Graphic of the colors in the range specified. You
can use ColorPlot to zoom in on a small range of colors. ColorPlot has a
PlotPoints option, and the graphic looks like a continuum if PlotPoints->60
is used. You can click on the graphic and use the mouse to get precise
(r,g,b) or (h,s,b) values of any color displayed.
ColorScale shows all the shades along a "straight line" between one color
and another. It works with Hue and RGBColor as in:
The strip of colors shown by ColorScale includes a horizontal axis with tick
marks (the colors start at 0 and stop at 1). GetColor takes two arguments.
The first argument must be the graphic returned by ColorScale, and the
second argument must be a number between 0 and 1. Using the line below
GetColor returns the color at 0.2 on the graphic ColorScale displays.
I will email it to you later this week after I do a little more work on it
I. If anyone else wants it let me know. Eventually I will send it to
For Mathematica tips, tricks see
Prev by Date:
Re: 3D Projection
Next by Date:
Some problems with DSolve and NDSolve
Previous by thread:
RGB color cube & HLS color cone
Next by thread:
Re: RGB color cube & HLS color cone