Colors
The following ways to specify colors are supported where a <color>
type is
mentioned:
/* specify a colors by hex code */
#rgb
#rrggbb
#rrggbbaa
/* specify a color by rgb. components should be in the range 0..1 */
rgb(<r> <g> <b>)
/* specify a color by rgba. components should be in the range 0..1 */
rgba(<r> <g> <b> <a>)
Examples:
/* set the color to green */
color: #f00;
/* set the color to green */
color: #ff0000;
/* set the color to green, 50% alpha */
color: #ff000080;
/* set the color to red */
color: rgb(1.0 0.0 0.0);
/* set the color to red, 50% alpha */
color: rgba(1.0 0.0 0.0 0.5);
/* use color number '3' from the color palette */
color: 3;
Color Palettes
The color palette allows you to easily reference colors that are frequently used in your diagram. Colors from the color palette are referenced by one-based index (see above).
You can use one of the built-in color palettes (see below) or define your own
color palette using the set
directive:
color-palette: custom(<color>...);
color-palette: <color-palette-name>;
For example:
/* set a custom color palette */
color-palette: custom(#06c #c06 #60c);
/* use the default 'fnord' color palette */
color-palette: fnord;
For another example, see:
/examples/charts-custom/custom_color_palette
List of default color palettes
The following color palletes are built in and can be referenced by name:
fnord |
● 1 ● 2 ● 3 ● 4 ● 5 ● 6 |
zhang |
● 1 ● 2 ● 3 ● 4 ● 5 ● 6 ● 7 ● 8 |