From b595828ed194324684c361589d4f45ef9201ee1a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 8 Jan 2026 11:34:22 -0800
Subject: [PATCH] xpm: enable extended color names by default
Fixes https://github.com/libsdl-org/SDL_image/pull/668
---
src/IMG_xpm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/IMG_xpm.c b/src/IMG_xpm.c
index ab593b22..42c83347 100644
--- a/src/IMG_xpm.c
+++ b/src/IMG_xpm.c
@@ -198,8 +198,7 @@ static int color_to_argb(char *spec, int speclen, Uint32 *argb)
{ "red", 0xffFF0000 },
{ "green", 0xff00FF00 },
{ "blue", 0xff0000FF },
-/* This table increases the size of the library by 40K, so it's disabled by default */
-#ifdef EXTENDED_XPM_COLORS
+#ifndef DISABLE_EXTENDED_XPM_COLORS
{ "aliceblue", 0xfff0f8ff },
{ "antiquewhite", 0xfffaebd7 },
{ "antiquewhite1", 0xffffefdb },
@@ -877,7 +876,7 @@ static int color_to_argb(char *spec, int speclen, Uint32 *argb)
{ "yellow3", 0xffCDCD00 },
{ "yellow4", 0xff8B8B00 },
{ "yellowgreen", 0xff9acd32 },
-#endif /* EXTENDED_XPM_COLORS */
+#endif /* !DISABLE_EXTENDED_XPM_COLORS */
};
if (spec[0] == '#') {