Skip to main content

parse_hex

Function parse_hex 

Source
pub fn parse_hex(s: &str) -> Option<[u8; 3]>
Expand description

Parse a #rrggbb (or rrggbb) hex color into its RGB bytes. Returns None for any string that isn’t exactly six hex digits — the single source of truth for what counts as a valid color, shared by config validation and the TUI renderer.