Class MBColor

  • All Implemented Interfaces:
    Expression, Function

    public class MBColor
    extends MBExpression
    A class to transform mapbox color expressions into GeoTools expressions.
    • Constructor Detail

      • MBColor

        public MBColor​(JSONArray json)
    • Method Detail

      • colorRGB

        public Expression colorRGB()
        Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error. Example: ["rgb", number, number, number]: color
        Returns:
        Color expression
      • colorRGBA

        public Expression colorRGBA()
        Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error. Example: ["rgba", number, number, number, number]: color
        Returns:
        Color expression
      • colorToRGBA

        public Expression colorToRGBA()
        Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order. Example: ["to-rgba", color]: array<number, 4>
        Returns:
        color expression