Skip to content

Commit 24cd235

Browse files
authored
Merge pull request #31 from Neotron-Compute/fix-palette
Fix palette
2 parents 14419f2 + e56392e commit 24cd235

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

src/video.rs

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -411,37 +411,37 @@ impl TextForegroundColour {
411411
/// The highest value a VGA text-mode foreground colour can have.
412412
pub const MAX: u8 = 15;
413413

414-
/// The colour *Black*, assuming the default palette is loaded.
414+
/// The colour *Black* in the default palette
415415
pub const BLACK: Self = Self(0);
416-
/// The colour *Dark Red*, assuming the default palette is loaded.
417-
pub const DARK_RED: Self = Self(1);
418-
/// The colour *Dark Green*, assuming the default palette is loaded.
419-
pub const DARK_GREEN: Self = Self(2);
420-
/// The colour *Orange*, assuming the default palette is loaded.
421-
pub const ORANGE: Self = Self(3);
422-
/// The colour *Blue*, assuming the default palette is loaded.
423-
pub const BLUE: Self = Self(4);
424-
/// The colour *Dark Magenta*, assuming the default palette is loaded.
425-
pub const DARK_MAGENTA: Self = Self(5);
426-
/// The colour *Dark Cyan*, assuming the default palette is loaded.
427-
pub const DARK_CYAN: Self = Self(6);
428-
/// The colour *Yellow*, assuming the default palette is loaded.
429-
pub const YELLOW: Self = Self(7);
430-
/// The colour *Grey*, assuming the default palette is loaded.
431-
pub const GREY: Self = Self(8);
432-
/// The colour *Bright Red*, assuming the default palette is loaded.
433-
pub const BRIGHT_RED: Self = Self(9);
434-
/// The colour *Bright Green*, assuming the default palette is loaded.
435-
pub const BRIGHT_GREEN: Self = Self(10);
436-
/// The colour *Bright Yellow*, assuming the default palette is loaded.
437-
pub const BRIGHT_YELLOW: Self = Self(11);
438-
/// The colour *Bright Blue*, assuming the default palette is loaded.
439-
pub const BRIGHT_BLUE: Self = Self(12);
440-
/// The colour *Bright Magenta*, assuming the default palette is loaded.
441-
pub const BRIGHT_MAGENTA: Self = Self(13);
442-
/// The colour *Bright Cyan*, assuming the default palette is loaded.
443-
pub const BRIGHT_CYAN: Self = Self(14);
444-
/// The colour *White*, assuming the default palette is loaded.
416+
/// The colour *Blue* in the default palette
417+
pub const BLUE: Self = Self(1);
418+
/// The colour *Green* in the default palette
419+
pub const GREEN: Self = Self(2);
420+
/// The colour *Cyan* in the default palette
421+
pub const CYAN: Self = Self(3);
422+
/// The colour *Red* in the default palette
423+
pub const RED: Self = Self(4);
424+
/// The colour *Magenta* in the default palette
425+
pub const MAGENTA: Self = Self(5);
426+
/// The colour *Brown* in the default palette
427+
pub const BROWN: Self = Self(6);
428+
/// The colour *Light Gray* in the default palette
429+
pub const LIGHT_GRAY: Self = Self(7);
430+
/// The colour *Dark Gray* in the default palette
431+
pub const DARK_GRAY: Self = Self(8);
432+
/// The colour *Light Blue* in the default palette
433+
pub const LIGHT_BLUE: Self = Self(9);
434+
/// The colour *Light Green* in the default palette
435+
pub const LIGHT_GREEN: Self = Self(10);
436+
/// The colour *Light Cyan* in the default palette
437+
pub const LIGHT_CYAN: Self = Self(11);
438+
/// The colour *Light Red* in the default palette
439+
pub const LIGHT_RED: Self = Self(12);
440+
/// The colour *Pink* in the default palette
441+
pub const PINK: Self = Self(13);
442+
/// The colour *Yellow* in the default palette
443+
pub const YELLOW: Self = Self(14);
444+
/// The colour *White* in the default palette
445445
pub const WHITE: Self = Self(15);
446446

447447
/// Make a new `TextForegroundColour` from an integer.
@@ -474,22 +474,22 @@ impl TextBackgroundColour {
474474
/// The highest value a VGA text-mode background colour can have.
475475
pub const MAX: u8 = 7;
476476

477-
/// The colour *Black*, assuming the default palette is loaded.
478-
pub const BLACK: TextBackgroundColour = TextBackgroundColour(0);
479-
/// The colour *Dark Red*, assuming the default palette is loaded.
480-
pub const DARK_RED: TextBackgroundColour = TextBackgroundColour(1);
481-
/// The colour *Dark Green*, assuming the default palette is loaded.
482-
pub const DARK_GREEN: TextBackgroundColour = TextBackgroundColour(2);
483-
/// The colour *Orange*, assuming the default palette is loaded.
484-
pub const ORANGE: TextBackgroundColour = TextBackgroundColour(3);
485-
/// The colour *Blue*, assuming the default palette is loaded.
486-
pub const BLUE: TextBackgroundColour = TextBackgroundColour(4);
487-
/// The colour *Dark Magenta*, assuming the default palette is loaded.
488-
pub const DARK_MAGENTA: TextBackgroundColour = TextBackgroundColour(5);
489-
/// The colour *Dark Cyan*, assuming the default palette is loaded.
490-
pub const DARK_CYAN: TextBackgroundColour = TextBackgroundColour(6);
491-
/// The colour *Yellow*, assuming the default palette is loaded.
492-
pub const YELLOW: TextBackgroundColour = TextBackgroundColour(7);
477+
/// The colour *Black* in the default palette
478+
pub const BLACK: Self = Self(0);
479+
/// The colour *Blue* in the default palette
480+
pub const BLUE: Self = Self(1);
481+
/// The colour *Green* in the default palette
482+
pub const GREEN: Self = Self(2);
483+
/// The colour *Cyan* in the default palette
484+
pub const CYAN: Self = Self(3);
485+
/// The colour *Red* in the default palette
486+
pub const RED: Self = Self(4);
487+
/// The colour *Magenta* in the default palette
488+
pub const MAGENTA: Self = Self(5);
489+
/// The colour *Brown* in the default palette
490+
pub const BROWN: Self = Self(6);
491+
/// The colour *Light Gray* in the default palette
492+
pub const LIGHT_GRAY: Self = Self(7);
493493

494494
/// Make a new TextForegroundColour from an integer.
495495
///

0 commit comments

Comments
 (0)