rgb
open fun rgb(@NonNull red: Expression, @NonNull green: Expression, @NonNull blue: Expression): Expression
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 usage:
FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setProperties(
fillColor(
rgb(
literal(255.0f),
literal(255.0f),
literal(255.0f)
)
)
);
Content copied to clipboard
Return
expression
Parameters
red
red color expression
green
green color expression
blue
blue color expression
See also
<a href="https://maplibre. org/maplibre-style-spec/expressions/#rgb">Style specification</a>
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 usage:
FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setProperties(
fillColor(
rgb(255.0f, 255.0f, 255.0f)
)
);
Content copied to clipboard
Return
expression
Parameters
red
red color value
green
green color value
blue
blue color value
See also
<a href="https://maplibre. org/maplibre-style-spec/expressions/#rgb">Style specification</a>