Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Graphics Options & Styling > Colors > RGBColor >
Mathematica > Data Manipulation > Image Processing & Analysis > Color Processing > Colors > RGBColor >
Mathematica > Visualization and Graphics > Symbolic Graphics Language > Graphics Directives > Colors > RGBColor >

RGBColor

RGBColor
is a graphics directive specifying that objects that follow are to be displayed, if possible, in the color given.
RGBColor
specifies opacity a.
  • 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 specifies color independent of lighting. »
  • In RGBColor, a is an "alpha channel" used to specify opacity.
  • Style specifies that expr should be displayed with the specified color. »
Specify the color of graphics primitives:
Specify the color with opacity:
Specify the output color of expressions:
Specify the color of plots:
Specify the color of graphics primitives:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the color with opacity:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the output color of expressions:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the color of plots:
In[1]:=
Click for copyable input
Out[1]=
Use diffuse surface color:
Use diffuse and specular surface color:
Use glow color, setting the diffuse surface color to black:
Use Blend to mix two or more colors:
Use Lighter and Darker to mix with white and black, respectively:
RGBColor is equivalent to RGBColor:
Use Opacity with RGBColor:
Use the opacity argument in RGBColor directly:
Define a one-dimensional color function:
Use ColorData for named color gradients:
Use ColorData for named color schemes:
Use ColorSetter to get a simple color selector (click the color rectangle):
Or use ColorSlider to directly select colors:
Values outside of the 0, 1 range will be clipped:
In plot functions, use ColorFunctionScaling to control global scaling of variables:
Visualizing the RGB color space:
RGB noise with opacity:
New in 1 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF