+ /* We want to make sure we can distinguish COL_CORRECTCOLOUR
+ * (which we hard-code as white) from COL_BACKGROUND (which
+ * could default to white on some platforms).
+ * Code borrowed from fifteen.c. */
+ max = ret[COL_BACKGROUND*3];
+ for (i = 1; i < 3; i++)
+ if (ret[COL_BACKGROUND*3+i] > max)
+ max = ret[COL_BACKGROUND*3+i];
+ if (max * 1.2F > 1.0F) {
+ for (i = 0; i < 3; i++)
+ ret[COL_BACKGROUND*3+i] /= (max * 1.2F);
+ }
+
+ /* We also want to be able to tell the difference between BACKGROUND
+ * and EMPTY, for similar distinguishing-hint reasons. */
+ ret[COL_EMPTY * 3 + 0] = ret[COL_BACKGROUND * 3 + 0] * 2.0 / 3.0;
+ ret[COL_EMPTY * 3 + 1] = ret[COL_BACKGROUND * 3 + 1] * 2.0 / 3.0;
+ ret[COL_EMPTY * 3 + 2] = ret[COL_BACKGROUND * 3 + 2] * 2.0 / 3.0;
+