fix color-related code

This commit is contained in:
griffi-gh 2023-02-09 03:33:41 +01:00
parent 8ed0765c9f
commit 6b34352c55

View file

@ -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])
}