From 14aacb681cd4fba34c80081969426c6df7e66cbf Mon Sep 17 00:00:00 2001 From: Willian Viana Date: Tue, 10 Dec 2024 11:15:15 -0300 Subject: [PATCH] fix(layer): update decode function --- providers/datasets-provider/config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/providers/datasets-provider/config.js b/providers/datasets-provider/config.js index e86715aa12..5396cff16b 100644 --- a/providers/datasets-provider/config.js +++ b/providers/datasets-provider/config.js @@ -77,10 +77,13 @@ const decodes = { float year = 1999.0 + ((color.b * 5.) * 255.); // map to years + // Old colors: 109, 72, 33 + // New colors: 19, 3, 255 if (year >= startYear && year <= endYear && year >= 2001.) { - color.r = 109. / 255.; - color.g = (72. - zoom + 109. - 3. * scaleIntensity / zoom) / 255.; - color.b = (33. - zoom + 229. - intensity / zoom) / 255.; + color.r = 19. / 255.; + color.g = (72. - zoom + 3. - scaleIntensity / zoom) / 255.; + color.b = (33. - zoom + 255. - intensity / zoom) / 255.; + alpha = (8. * intensity) / 255.; } else { alpha = 0.; }