Package org.geotools.mbstyle.expression
Class MBColor
- 
- All Implemented Interfaces:
- Expression,- Function
 
 public class MBColor extends MBExpression A class to transform mapbox color expressions into GeoTools expressions.
- 
- 
Field Summary- 
Fields inherited from class MBExpressioncolors, decisions, featureData, ff, heatMap, json, lookUp, math, name, parse, ramps, string, transformer, types, variableBindings, zoom
 - 
Fields inherited from class FunctionImplfunctionName
 - 
Fields inherited from interface ExpressionNIL
 
- 
 - 
Constructor SummaryConstructors Constructor Description MBColor(JSONArray json)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressioncolorRGB()Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1.ExpressioncolorRGBA()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.ExpressioncolorToRGBA()Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.ExpressiongetExpression()Determines which expression to use.- 
Methods inherited from class MBExpressioncanCreate, create, getName, throwInsufficientArgumentCount, throwUnexpectedArgumentCount, transformExpression, transformLiteral
 - 
Methods inherited from class FunctionImplaccept, dispatchArguments, equals, evaluate, functionName, getFallbackValue, getFunctionName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters, toString
 - 
Methods inherited from class ExpressionAbstractevaluate
 - 
Methods inherited from interface Expressionevaluate
 
- 
 
- 
- 
- 
Method Detail- 
colorRGBpublic 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
 
 - 
colorRGBApublic 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
 
 - 
colorToRGBApublic 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
 
 - 
getExpressionpublic Expression getExpression() throws MBFormatException Description copied from class:MBExpressionDetermines which expression to use.- Specified by:
- getExpressionin class- MBExpression
- Throws:
- MBFormatException
 
 
- 
 
-