diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index 67a621de..2d42e9f2 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -2677,7 +2677,10 @@ impl FromStr for Color { type Err = miette::Error; fn from_str(s: &str) -> Result { - let color = csscolorparser::parse(s).into_diagnostic()?.to_array(); + let color = csscolorparser::parse(s) + .into_diagnostic()? + .clamp() + .to_array(); Ok(Self::from_array_unpremul(color)) } }