From 6b34352c5529f8f500fd3a262580281b6aa3ce25 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Thu, 9 Feb 2023 03:33:41 +0100 Subject: [PATCH] fix color-related code --- kubi/src/color.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubi/src/color.rs b/kubi/src/color.rs index 1854ff4..6e11e3e 100644 --- a/kubi/src/color.rs +++ b/kubi/src/color.rs @@ -6,7 +6,7 @@ pub fn color_rgba(r: u8, g: u8, b: u8, a: u8) -> Vec4 { } #[inline(always)] -pub const fn color_hex(c: u32) -> Vec4 { +pub fn color_hex(c: u32) -> Vec4 { let c = c.to_le_bytes(); - vec4(c[0] as f32, c[1] as f32, c[2] as f32, c[3] as f32) + color_rgba(c[0], c[1], c[2], c[3]) }