diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2020-01-27 16:36:40 -0800 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2020-01-27 16:36:40 -0800 |
commit | c8ac59f3f299c6b22d79f4038f690b4dadbe79b5 (patch) | |
tree | 0cc1979826d8e53d1385bb9f0531370bb7fb397c | |
parent | 0de6ffc383022e3ebfb658a729a0c9d7d7b026c4 (diff) | |
download | qtlocation-mapboxgl-upstream/fabian-color-helper-125.tar.gz |
[ios] Fix a color conversion bug.upstream/fabian-color-helper-125
The color that is passed from iOS is already premultiplied with the alpha value. Multiplying again causes the color to render a different tone.
-rw-r--r-- | src/mbgl/style/expression/util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/style/expression/util.cpp b/src/mbgl/style/expression/util.cpp index ee680dab08..6a265a20dd 100644 --- a/src/mbgl/style/expression/util.cpp +++ b/src/mbgl/style/expression/util.cpp @@ -29,7 +29,7 @@ Result<Color> rgba(double r, double g, double b, double a) { "]: 'a' must be between 0 and 1." }; } - return Color(r / 255 * a, g / 255 * a, b / 255 * a, a); + return Color(r / 255, g / 255, b / 255, a); } } // namespace expression |