From 918578469ef35c8226a3c2788bc37c2e05bd98ed Mon Sep 17 00:00:00 2001 From: elasota Date: Mon, 30 Dec 2019 20:52:56 -0500 Subject: [PATCH] Fix low gray color mapping to dark red --- PortabilityLayer/QDStandardPalette.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PortabilityLayer/QDStandardPalette.cpp b/PortabilityLayer/QDStandardPalette.cpp index cc04b23..c72a762 100644 --- a/PortabilityLayer/QDStandardPalette.cpp +++ b/PortabilityLayer/QDStandardPalette.cpp @@ -93,6 +93,12 @@ namespace PortabilityLayer { if (g <= 1 && g <= 1) { + if (b <= 1) + { + // Special case low gray scale + return 255 - b; + } + // Red scale unsigned int scale6Step; unsigned int scale6StepRemainder;