… | |
… | |
1503 | |
1503 | |
1504 | index_88 = (r * 4 + g) * 4 + b + 16 # r, g, b = 0..3 |
1504 | index_88 = (r * 4 + g) * 4 + b + 16 # r, g, b = 0..3 |
1505 | index_256 = (r * 16 + g) * 16 + b + 16 # r, g, b = 0..15 |
1505 | index_256 = (r * 16 + g) * 16 + b + 16 # r, g, b = 0..15 |
1506 | |
1506 | |
1507 | The grayscale ramp uses indices 80..87 (232..239), from 10% to 90% in 10% |
1507 | The grayscale ramp uses indices 80..87 (232..239), from 10% to 90% in 10% |
1508 | steps (1/26 to 25/26 in 1/26 steps). |
1508 | steps (1/26 to 25/26 in 1/26 steps) - black and white are already part of |
|
|
1509 | the RGB cube. |
1509 | |
1510 | |
1510 | Together, all those colours implement the 88 (256) colour xterm |
1511 | Together, all those colours implement the 88 (256) colour xterm |
1511 | colours. Only the first 16 can be changed using resources currently, the |
1512 | colours. Only the first 16 can be changed using resources currently, the |
1512 | rest can only be changed via command sequences ("escape codes"). |
1513 | rest can only be changed via command sequences ("escape codes"). |
|
|
1514 | |
|
|
1515 | Applications are advised to use terminfo or command sequences to discover |
|
|
1516 | number and RGB values of all colours (yes, you can query this...). |
1513 | |
1517 | |
1514 | Note that B<-rv> (B<"reverseVideo: True">) simulates reverse video by |
1518 | Note that B<-rv> (B<"reverseVideo: True">) simulates reverse video by |
1515 | always swapping the foreground/background colours. This is in contrast to |
1519 | always swapping the foreground/background colours. This is in contrast to |
1516 | I<xterm>(1) where the colours are only swapped if they have not otherwise |
1520 | I<xterm>(1) where the colours are only swapped if they have not otherwise |
1517 | been specified. For example, |
1521 | been specified. For example, |