From c8ac59f3f299c6b22d79f4038f690b4dadbe79b5 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Mon, 27 Jan 2020 16:36:40 -0800 Subject: [ios] Fix a color conversion bug. The color that is passed from iOS is already premultiplied with the alpha value. Multiplying again causes the color to render a different tone. --- src/mbgl/style/expression/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 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 -- cgit v1.2.1