Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
fix: make hex color parsing robust against extra quotes and spaces
src/server/config.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/server/config.rs b/src/server/config.rs
index b3da516..378dcd0 100644
--- a/src/server/config.rs
+++ b/src/server/config.rs
@@ -382,7 +382,8 @@ pub struct TagLayoutConfig {
}
pub fn parse_hex_color(hex_str: &str) -> u32 {
- let hex = hex_str.trim_start_matches('#');
+ let hex = hex_str.trim_matches(|c| c == '"' || c == '\'' || c == ' ');
+ let hex = hex.trim_start_matches('#');
if hex.len() != 6 {
return 0xFFFFFFFF; // fallback to white
}