add `color_alpha` function

Nate Butler created

Change summary

crates/theme2/src/theme2.rs | 6 ++++++
1 file changed, 6 insertions(+)

Detailed changes

crates/theme2/src/theme2.rs 🔗

@@ -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
+}