maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
1.04k stars 300 forks source link

Allow alpha channel in colors provided as expression or string #2727

Open Helium314 opened 1 month ago

Helium314 commented 1 month ago

Is your feature request related to a problem? Please describe. When providing an integer color value, e.g. iconColor(@ColorInt value: Int), I can provide a color with alpha channel (e.g. 0x88d140d0). In contrast, when providing a color using a hex color string ("#88D140D0") or an expression, a color with alpha channel results in black.

Describe the solution you'd like Ideally MapLibre would understand the alpha channel consistently in all cases.

Describe alternatives you've considered Process the RGBA color and split it into opacity and RGB color. While this is not technically difficult to do, the repeated necessity to do it is somewhat annoying.