From acb33777c6110e2685f812675586e04dcd34f0e6 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sun, 10 Jul 2022 12:36:10 +0200 Subject: [PATCH] Sort RGB colors as specified in the docs --- src/gfx/pal_sorting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx/pal_sorting.cpp b/src/gfx/pal_sorting.cpp index 08e481d0..5001361a 100644 --- a/src/gfx/pal_sorting.cpp +++ b/src/gfx/pal_sorting.cpp @@ -97,7 +97,7 @@ void rgb(std::vector &palettes) { for (Palette &pal : palettes) { std::sort(pal.begin(), pal.end(), [](uint16_t lhs, uint16_t rhs) { - return legacyLuminance(lhs) < legacyLuminance(rhs); + return legacyLuminance(lhs) > legacyLuminance(rhs); }); } }