View Single Post
Old January 10, 2018, 11:58   #8
Quirk
Swordsman
 
Join Date: Mar 2016
Posts: 338
Quirk is on a distinguished road
From the comment in your patch:

Code:
/* If we have more than 16 colors, find the best matches. These numbers
 * correspond to xterm/rxvt's builtin color numbers--they do not
 * correspond to curses' constants OR with curses' color pairs.
 *
 * XTerm has 216 (6*6*6) RGB colors, with each RGB setting 0-5.
 * RXVT has 64 (4*4*4) RGB colors, with each RGB setting 0-3.
 *
 * Both also have the basic 16 ANSI colors, plus some extra grayscale
 * colors which we do not use.
 */
This is followed by looping over the 16 colours in the GCU "colortable" array, finding the most appropriate colour in the XTerm or RXVT colour space to use, and using it. Only the first 16 Angband colours (there are 32, specified in a table large enough to hold 256, the rest of the data apparently uninitialised!) are scaled into XTerm or RXVT colour space.

For the most part it isn't really an issue - you don't want to have colours so similar that you're trying to determine whether that's a mauve 'd' or a lilac 'd' you're facing off against - but since in the GCU implementation the background colour is linked to the foreground colour, more work would need to be done to be able to change the background colour to highlight unwary monsters.
Quirk is offline   Reply With Quote