rgb

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)
        )
    )
);

Return

expression

Parameters

red

red color expression

green

green color expression

blue

blue color expression

See also


open fun rgb(@NonNull red: Number, @NonNull green: Number, @NonNull blue: Number): Expression(source)

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)
    )
);

Return

expression

Parameters

red

red color value

green

green color value

blue

blue color value

See also