Class ForegroundColorStyleFactory

  • All Implemented Interfaces:
    ParametricStyleFactory
    Direct Known Subclasses:
    BackgroundColorStyleFactory

    public class ForegroundColorStyleFactory
    extends java.lang.Object
    implements ParametricStyleFactory
    Create a text style that colours text according to the value of the parameters. It is parsed similarly to colours in HTML, using a parameter of the form #rrggbb or #aarrggbb (the # is optional).

    Alternatively, the color may consist of floating point numbers between 0 and 1 that describe hue, saturation, brightness, and (optionally) alpha components as an angle (hue) and ratios, e.g. "180 0.5 0.5 0.5".

    Author:
    Chris Jennings
    • Constructor Detail

      • ForegroundColorStyleFactory

        public ForegroundColorStyleFactory()
    • Method Detail

      • parseColor

        public static java.awt.Color parseColor​(java.lang.String[] parameters)
        Parse a color value from the tag's parameters. Returns null if the parameters cannot be effectively parsed, in which case a style is returned that has no effect.