Expand description
Color translation tables, hex/HSV parsing, and SVG color formatting ported from
Graphviz 16.1.0 (lib/common/colxlate.c, lib/common/colortbl.h, lib/common/color.h).
Structs§
- Rgba
Color - Resolved 8-bit RGBA color (
r,g,b,a).
Functions§
- format_
svg_ color - Formats a Graphviz color spec into an SVG color string (
#rrggbb,#rrggbbaa, or"none"), falling back to"black"(#000000) if unknown. - hsv2rgb
- Port of
hsv2rgbfromlib/common/colxlate.c. - resolve_
color - Resolves a Graphviz color specification (
#rgb,#rgba,#rrggbb,#rrggbbaa,"h,s,v","h s v", or X11/SVG/Brewer named color) to anRgbaColor. - resolve_
color_ with_ scheme - Resolves a Graphviz color specification with an optional active
colorscheme, followingcolorxlateinlib/common/colxlate.c. ReturnsNonefor an unknown color (C yields opaque black and warns; seewarn_unknown_color). - rgb2hsv
- Port of
rgb2hsvfromlib/common/colxlate.c. - warn_
unknown_ color - Prints
Warning: <name> is not a known color.to stderr, once per distinct name, likegvrender_resolve_color.