added all remaining formats
This commit is contained in:
@@ -85,6 +85,11 @@ pub const DEFAULT_PALETTE: [(u8, u8, u8); 12] = [
|
||||
(106, 28, 138), // Violet
|
||||
];
|
||||
|
||||
/// Look up a PEC palette color by index, clamping to valid range.
|
||||
pub fn pec_color(idx: u8) -> (u8, u8, u8) {
|
||||
PEC_PALETTE[(idx as usize).min(PEC_PALETTE.len() - 1)]
|
||||
}
|
||||
|
||||
/// Build a color list for `n` thread slots by cycling through `DEFAULT_PALETTE`.
|
||||
pub fn default_colors(n: usize) -> Vec<(u8, u8, u8)> {
|
||||
(0..n)
|
||||
|
||||
Reference in New Issue
Block a user