shithub: rgbds

Download patch

ref: acb33777c6110e2685f812675586e04dcd34f0e6
parent: d15916b1bdc8baa69918a6a94ec0f666a4243384
author: ISSOtm <eldredhabert0@gmail.com>
date: Sun Jul 10 08:36:10 EDT 2022

Sort RGB colors as specified in the docs

--- a/src/gfx/pal_sorting.cpp
+++ b/src/gfx/pal_sorting.cpp
@@ -97,7 +97,7 @@
 
 	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);
 		});
 	}
 }