color

Colors can be specified using one of four formats:

"#%2x%2x%2x" Red-Green-Blue (RGB)
"#%2x%2x%2x%2x" Red-Green-Blue-Alpha (RGBA)
"H[, ]+S[, ]+V" Hue-Saturation-Value (HSV) 0.0 <= H,S,V <= 1.0
string color name

The specification for the RGB and RGBA formats are the format strings used by sscanf to scan the color value. Thus, these values have the form “#RGB” or “#RGBA”, where R, G, B, and A each consist of 2 hexadecimal digits, and can be separated by whitespace. HSV colors have the form of 3 numbers between 0 and 1, separated by whitespace or commas.

String-valued color specifications are case-insensitive and interpreted in the context of the current color scheme, as specified by the colorscheme attribute. If this is undefined, the X11 naming scheme will be used. An initial "/" character can be used to override the use of the colorscheme attribute. In particular, a single initial "/" will cause the string to be evaluated using the default X11 naming. If the color value has the form "/ssss/yyyy", the name yyyy is interpreted using the schema ssss. If the color scheme name is empty, i.e., the color has the form "//yyyy", the colorscheme attribute is used. Thus, the forms "yyyy" and "//yyyy" are equivalent.

At present, Graphviz recognizes the default color scheme X11, and the Brewer color schemes (cf. ColorBrewer). Please note that Brewer color schemes are covered by this license.

Examples:

Color RGB HSV String
White "#ffffff" "0.000 0.000 1.000" "white"
Black "#000000" "0.000 0.000 0.000" "black"
Red "#ff0000" "0.000 1.000 1.000" "red"
Turquoise "#40e0d0" "0.482 0.714 0.878" "turquoise"
Sienna "#a0522d" "0.051 0.718 0.627" "sienna"

The string value transparent can be used to indicate no color. This is only available in the output formats ps, svg, fig, vmrl, and the bitmap formats. It can be used whenever a color is needed but is most useful with the bgcolor attribute. Usually, the same effect can be achieved by setting style to invis.

Attributes

color is a valid type for:
Last modified June 14, 2021 : Update docsy theme (097a529)