(value: Srgb)
| 103 | |
| 104 | impl From<Srgb> for Hsl { |
| 105 | fn from(value: Srgb) -> Self { |
| 106 | let r = value.red as f64 / 255.0; |
| 107 | let g = value.green as f64 / 255.0; |
| 108 | let b = value.blue as f64 / 255.0; |
| 109 | let (hue, saturation, lightness) = srgb_float_to_hsl(r, g, b); |
| 110 | Hsl::new(hue as f32, saturation as f32, lightness as f32, value.alpha) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | impl From<Hsl> for Srgb { |
nothing calls this directly
no test coverage detected