RGBColor[red, green, blue]
is a graphics directive specifying that objects that follow are to be displayed, if possible, in the color given.

RGBColor[r, g, b, a]
specifies opacity a.


  • The alternative forms RGBColor[{r, g, b}] and RGBColor[{r, g, b, a}] can also be used. »
  • Red, green, and blue color intensities outside the range 0 to 1 will be clipped, as will opacities. »
  • On monochrome output devices, a gray level based on the average of the color intensities is used.
  • For 3D surfaces, explicit RGBColor directives define surface colors; the final shading depends on lighting and contributions from specularity and glow. »
  • Glow[RGBColor[...]] specifies color independent of lighting. »
  • In RGBColor[r, g, b, a], a is an "alpha channel" used to specify opacity.
  • RGBColor[r, g, b, a] is equivalent to {RGBColor[r, g, b], Opacity[a]}. »
  • If no opacity has been specified, RGBColor[r, g, b] is equivalent to RGBColor[r, g, b, 1].
  • Style[expr, RGBColor[...]] specifies that expr should be displayed with the specified color. »
New in 1 | Last modified in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »