From 51aeebd8893c37438e389d1678de524cc5e261d0 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 7 Apr 2026 13:32:42 -0700
Subject: [PATCH] testcolorspace: fixed color check when output is linear
colorspace with 8-bit precision
---
test/testcolorspace.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/testcolorspace.c b/test/testcolorspace.c
index 36be78fde4847..e2bfeb400f647 100644
--- a/test/testcolorspace.c
+++ b/test/testcolorspace.c
@@ -365,7 +365,8 @@ static void RenderBlendDrawing(void)
y += TEXT_LINE_ADVANCE;
DrawText(x, y, "Test: Draw Blending");
y += TEXT_LINE_ADVANCE;
- if (cr.r == 199 && cr.g == 193 && cr.b == 121) {
+ if ((cr.r == 199 && cr.g == 193 && cr.b == 121) ||
+ (cr.r == 199 && cr.g == 193 && cr.b == 120)) {
DrawText(x, y, "Correct blend color, blending in linear space");
} else if ((cr.r == 192 && cr.g == 163 && cr.b == 83) ||
(cr.r == 191 && cr.g == 162 && cr.b == 82)) {
@@ -425,7 +426,8 @@ static void RenderBlendTexture(void)
y += TEXT_LINE_ADVANCE;
DrawText(x, y, "Test: Texture Blending");
y += TEXT_LINE_ADVANCE;
- if (cr.r == 199 && cr.g == 193 && cr.b == 121) {
+ if ((cr.r == 199 && cr.g == 193 && cr.b == 121) ||
+ (cr.r == 199 && cr.g == 193 && cr.b == 120)) {
DrawText(x, y, "Correct blend color, blending in linear space");
} else if ((cr.r == 192 && cr.g == 163 && cr.b == 83) ||
(cr.r == 191 && cr.g == 162 && cr.b == 82)) {