Skip to content

Commit

Permalink
Add white color to face
Browse files Browse the repository at this point in the history
  • Loading branch information
dmweis committed Feb 29, 2024
1 parent b86a22d commit 9c1dd54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/face/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,42 @@ pub const GREEN: RGB = RGB::new(0, 10, 0);
pub const YELLOW: RGB = RGB::new(10, 10, 0);
pub const PURPLE: RGB = RGB::new(10, 0, 10);
pub const CYAN: RGB = RGB::new(0, 10, 10);
pub const WHITE: RGB = RGB::new(10, 10, 10);
pub const BRIGHT_RED: RGB = RGB::new(180, 0, 0);
pub const BRIGHT_BLUE: RGB = RGB::new(0, 0, 180);
pub const BRIGHT_GREEN: RGB = RGB::new(0, 180, 0);
pub const BRIGHT_YELLOW: RGB = RGB::new(100, 100, 0);
pub const BRIGHT_PURPLE: RGB = RGB::new(100, 0, 100);
pub const BRIGHT_CYAN: RGB = RGB::new(0, 100, 100);
pub const BRIGHT_WHITE: RGB = RGB::new(100, 100, 100);

pub const ALL_COLORS: [RGB; 12] = [
pub const ALL_COLORS: [RGB; 14] = [
RED,
BLUE,
GREEN,
YELLOW,
PURPLE,
CYAN,
WHITE,
BRIGHT_RED,
BRIGHT_BLUE,
BRIGHT_GREEN,
BRIGHT_YELLOW,
BRIGHT_PURPLE,
BRIGHT_CYAN,
BRIGHT_WHITE,
];

pub const NORMAL_COLORS: [RGB; 6] = [RED, BLUE, GREEN, YELLOW, PURPLE, CYAN];
pub const NORMAL_COLORS: [RGB; 7] = [RED, BLUE, GREEN, YELLOW, PURPLE, CYAN, WHITE];

pub const BRIGHT_COLORS: [RGB; 6] = [
pub const BRIGHT_COLORS: [RGB; 7] = [
BRIGHT_RED,
BRIGHT_BLUE,
BRIGHT_GREEN,
BRIGHT_YELLOW,
BRIGHT_PURPLE,
BRIGHT_CYAN,
BRIGHT_WHITE,
];

fn corrected_pixel_index(index: i32) -> usize {
Expand Down
2 changes: 2 additions & 0 deletions src/openai/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ pub enum FaceColor {
Yellow,
Purple,
Cyan,
White,
}

#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
Expand Down Expand Up @@ -203,6 +204,7 @@ impl ChatGptFunction for FaceDisplayFuncCallback {
FaceColor::Yellow => crate::face::driver::YELLOW,
FaceColor::Purple => crate::face::driver::PURPLE,
FaceColor::Cyan => crate::face::driver::CYAN,
FaceColor::White => crate::face::driver::WHITE,
},
None => crate::face::driver::PURPLE,
};
Expand Down

0 comments on commit 9c1dd54

Please sign in to comment.