color property

Color color

The color of the line symbol.

When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

The default value is light gray.

Implementation

Color get color => _color.value;
void color=(Color value)

Implementation

set color(Color value) => _color.value = value;