Class CssColor


public class CssColor extends FillStrokeStyle
CSS Color object.

To handle dev mode we must wrap JSO strings in an array. Therefore, when in dev mode, CssColor is actually an array with one element that is the JSO. In Production Mode, this is not needed.

See Also:
  • Constructor Details

    • CssColor

      protected CssColor()
  • Method Details

    • make

      public static final CssColor make(int r, int g, int b)
      Sets the RGB color value.
      Parameters:
      r - red, integer between 0 and 255
      g - green, integer between 0 and 255
      b - blue, integer between 0 and 255
      Returns:
      a CssColor object
    • make

      public static final CssColor make(String cssColor)
      Creates a CssColor object. Examples: blue, #ff0000, #f00, rgb(255,0,0)
      Parameters:
      cssColor - the CSS color
      Returns:
      a CssColor object
    • value

      public final String value()
      Returns the value of the CssColor, as a String.
      Returns:
      the value of the color, as a String.