SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 48144: Use transparent (RGBA) colors with SAS/GRAPH®

DetailsCodeOutputAboutRate It
Beginning with SAS® 9.3, SAS/GRAPH now supports transparent colors, also known as RGBA colors. For example, with RGBA support, you can create transparent bars with PROC GCHART where the background image is visible behind the bars.

Documentation on RGBA color support is located here:

Color-Naming Schemes

RGBA color names are in the form arrggbbaa, where the following is true:

  • a indicates to SAS that this is an RGBA color specification.
  • rr is the red component.
  • gg is the green component.
  • bb is the blue component.
  • aa is the transparency component.
As with the RGB color scheme, the components are given as hexadecimal numbers in the range 00 through FF (0% to 100%). The transparency component defines the intensity (opacity) of the color, with 00 being the most transparent and FF being the least transparent.

The sample code on the Full Code tab demonstrates how to use PROC GCHART to create a vertical bar chart with transparent bars.


These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.