Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: RGB color cube & HLS color cone

  • To: mathgroup at
  • Subject: [mg19741] Re: RGB color cube & HLS color cone
  • From: Jens-Peer Kuska <kuska at>
  • Date: Wed, 15 Sep 1999 03:52:58 -0400
  • Organization: Universitaet Leipzig
  • References: <7redsv$>
  • Sender: owner-wri-mathgroup at

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.
> Thanks for any suggestions.
> Dick Phillips

Hi, the RGB cube is easy:

rgbcube = 
    Table[{SurfaceColor[RGBColor[r, g, b]], 
        Cuboid[{10.5r, 10.5g, 10.5b}]}, {r, 0, 1, 0.1}, {g, 0, 1, 0.1},
{b, 0,
         1, 0.1}];

rgbgraph = Show[Graphics3D[rgbcube]]

For interactive viewing you can try MathGL3d at

but the there is no support for slicing.

Hope that helps

  • Prev by Date: Re: 3D Projection
  • Next by Date: Where's the Speed?
  • Previous by thread: RE: RGB color cube & HLS color cone
  • Next by thread: RealTime3D in v4.0: Capabilities and compatibilities