diff --git a/coders/uil.c b/coders/uil.c
index 7a86a59..28003f3 100644
--- a/coders/uil.c
+++ b/coders/uil.c
@@ -329,7 +329,7 @@
     else
       (void) FormatLocaleString(buffer,MaxTextExtent,
         "    color('%s',%s) = '%s'",name,
-        GetPixelPacketIntensity(image->colormap+i) <
+        GetPixelInfoIntensity(image->colormap+i) <
         ((Quantum) QuantumRange/2) ? "background" : "foreground",symbol);
     (void) WriteBlobString(image,buffer);
     (void) FormatLocaleString(buffer,MaxTextExtent,"%s",