Gets the colour a style colour knob is at on the map, whether or not its module exists. It is what its module was given, one the loaded style derives from a set map colour, or the style's own.
The colour's map-wide id, from styleColorKnobIds.
The colour, or undefined where the style draws it with an expression no single colour stands for, has no layer for it, or is still loading.
undefined
const slow = getStyleColor(map, 'traffic.flow.colors.slow');const water = getStyleColor(map, 'colors.water'); Copy
const slow = getStyleColor(map, 'traffic.flow.colors.slow');const water = getStyleColor(map, 'colors.water');
Gets the colour a style colour knob is at on the map, whether or not its module exists. It is what its module was given, one the loaded style derives from a set map colour, or the style's own.