Use srgb, get mix and blend working

This commit is contained in:
Nate Butler 2024-01-16 01:08:17 -05:00
parent bdb06f183b
commit dde0056845
2 changed files with 112 additions and 65 deletions

View file

@ -147,10 +147,3 @@ pub fn color_alpha(color: Hsla, alpha: f32) -> Hsla {
color.a = alpha;
color
}
pub fn to_gpui_hsla(color: color::Color) -> gpui::Hsla {
let hsla = color.value();
let hue: f32 = hsla.hue.into();
gpui::hsla(hue / 360.0, hsla.saturation, hsla.lightness, hsla.alpha)
}