java.lang.Object
org.jfree.svg.SvgColor
Parses the CSS colour forms allowed for graph theme variables.
Graph colours are moving from values hard-coded into the SVG to CSS custom properties, so a theme can set them by name. That means the server has to read whatever the theme author wrote and turn it into a Color, and it has to accept the shorthand forms people actually write.
Supported, all with an optional alpha:
#rgband#rgba—#f0a,#ee9d#rrggbband#rrggbbaa—#00ff99,#00ff9980rgb(r,g,b)andrgba(r,g,b,a)—rgb(0,255,153),rgba(0,255,153,.5)
Alpha is 0–255 as written in hex, or 0–1 as written in rgb/rgba, matching CSS. Shorthand digits are doubled, so #ee9d is #eeee99dd — the CSS rule, not "expand each digit once".
Anything unrecognised returns null rather than a wrong colour: a theme with a typo in one variable should fall back to the built-in value for that one series, not silently render every plot in the default colour.
Method Summary
All Methods
Method Details
parse
format