Terminal color is represented by means of "color pairs". These are just numbers, from 0 to Color.Pairs - 1 (0 being the default for everything) that are associated a foreground and a background color and are used as attributes to characters on the screen.
Similarly, all colors - see the color constants in this class
which represent the ANSI standard ones - are just numbers from 0 to Color.Colors - 1 which are, again, connected to RGB values.
The more important part, however, is, that one has to stick to that number representation, especially of color pairs. You can fancily color one line of text with color pair 1 (which was previously defined by you) but as soon as you change the definition of color pair 1, the line mentioned above will change to that new definition! (BTW, you access a particular color pair through the array accessors of this class)
Having said above that 0 is the default color pair for everything, think of the Window
class... It is true for it either. So using the Window.Background and Window.Foreground properties affect exactly the color pair that was set through Window.Attributes.Color, which, in turn, is 0 per default.
I hope, it was clarified that using color will take some extra thoughts...
Esta classe é estática.
Esta classe funciona como um array apenas leitura