Add From<&str> for Hsla

This commit is contained in:
Nate Butler
2023-11-01 00:51:47 -04:00
parent 272f856460
commit e0cb95b334
+6
View File
@@ -233,6 +233,12 @@ impl Hsla {
}
}
impl From<&str> for Hsla {
fn from(s: &str) -> Self {
Rgba::try_from(s).unwrap().into()
}
}
// impl From<Hsla> for Rgba {
// fn from(value: Hsla) -> Self {
// let h = value.h;