pub const HEX_COLOR: &str = r"^#?([a-fA-F0-9]{8}|[a-fA-F0-9]{6}|[a-fA-F0-9]{4}|[a-fA-F0-9]{3})$";Expand description
Regex for matching a valid hex color (#aabbcc/#abc).
ยงExample
use regex::Regex;
use valust_regex_utils::HEX_COLOR;
let color_regex = Regex::new(HEX_COLOR).unwrap();
assert!(color_regex.is_match("#00ff00"));
assert!(color_regex.is_match("#123"));
assert!(color_regex.is_match("#223344ff"));