From 55d70cc02d1e76467e6df1cb86cc660c58cbb6f6 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Thu, 9 Feb 2023 03:34:49 +0100 Subject: [PATCH] fix default colors and color_hex function --- kubi/src/color.rs | 2 +- kubi/src/gui.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kubi/src/color.rs b/kubi/src/color.rs index 6e11e3e..5e0728b 100644 --- a/kubi/src/color.rs +++ b/kubi/src/color.rs @@ -7,6 +7,6 @@ pub fn color_rgba(r: u8, g: u8, b: u8, a: u8) -> Vec4 { #[inline(always)] pub fn color_hex(c: u32) -> Vec4 { - let c = c.to_le_bytes(); + let c = c.to_be_bytes(); color_rgba(c[0], c[1], c[2], c[3]) } diff --git a/kubi/src/gui.rs b/kubi/src/gui.rs index 2230e2b..ebdb0c1 100644 --- a/kubi/src/gui.rs +++ b/kubi/src/gui.rs @@ -33,7 +33,7 @@ impl Default for GuiTransform { pub struct PrimaryColor(pub Vec4); impl Default for PrimaryColor { fn default() -> Self { - Self(color_hex(0x156cdd)) + Self(color_hex(0x156cddff)) } } @@ -41,7 +41,7 @@ impl Default for PrimaryColor { pub struct SecondaryColor(pub Vec4); impl Default for SecondaryColor { fn default() -> Self { - Self(color_hex(0xc9d5e4)) + Self(color_hex(0xc9d5e4ff)) } }