cp437_tools/libs/public/colour.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
//! ANSI colours
/// A list of 16 RGB values corresponding to the 4-bit colours used by CP437
/// files
///
/// List of colours:
///
/// * Dark
///
/// 0. Black
/// 1. Red
/// 2. Green
/// 3. Yellow
/// 4. Blue
/// 5. Magenta
/// 6. Cyan
/// 7. White
///
/// * Light
///
/// 8. Black
/// 9. Red
/// 10. Green
/// 11. Yellow
/// 12. Blue
/// 13. Magenta
/// 14. Cyan
/// 15. White
///
pub static COLOURS: &[[u8; 3]] = &[
// DARK
[0x00, 0x00, 0x00], // BLACK
[0xAB, 0x00, 0x00], // RED
[0x00, 0xAB, 0x00], // GREEN
[0xAB, 0x57, 0x00], // YELLOW
[0x00, 0x00, 0xAB], // BLUE
[0xAB, 0x00, 0xAB], // MAGENTA
[0x00, 0xAB, 0xAB], // CYAN
[0xAB, 0xAB, 0xAB], // WHITE
// BRIGHT
[0x57, 0x57, 0x57], // BLACK
[0xFF, 0x57, 0x57], // RED
[0x57, 0xFF, 0x57], // GREEN
[0xFF, 0xFF, 0x57], // YELLOW
[0x57, 0x57, 0xFF], // BLUE
[0xFF, 0x57, 0xFF], // MAGENTA
[0x57, 0xFF, 0xFF], // CYAN
[0xFF, 0xFF, 0xFF], // WHITE
];