add color_alpha function

This commit is contained in:
Nate Butler 2023-12-07 00:15:43 -05:00
parent fffe4f51fb
commit da3ba35d1c

View file

@ -150,3 +150,9 @@ pub struct DiagnosticStyle {
pub hint: Hsla,
pub ignored: Hsla,
}
pub fn color_alpha(color: Hsla, alpha: f32) -> Hsla {
let mut color = color;
color.a = alpha;
color
}