fix default colors and color_hex function

This commit is contained in:
griffi-gh 2023-02-09 03:34:49 +01:00
parent 144cff3268
commit 55d70cc02d
2 changed files with 3 additions and 3 deletions

View file

@ -7,6 +7,6 @@ pub fn color_rgba(r: u8, g: u8, b: u8, a: u8) -> Vec4 {
#[inline(always)] #[inline(always)]
pub fn color_hex(c: u32) -> Vec4 { 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]) color_rgba(c[0], c[1], c[2], c[3])
} }

View file

@ -33,7 +33,7 @@ impl Default for GuiTransform {
pub struct PrimaryColor(pub Vec4); pub struct PrimaryColor(pub Vec4);
impl Default for PrimaryColor { impl Default for PrimaryColor {
fn default() -> Self { fn default() -> Self {
Self(color_hex(0x156cdd)) Self(color_hex(0x156cddff))
} }
} }
@ -41,7 +41,7 @@ impl Default for PrimaryColor {
pub struct SecondaryColor(pub Vec4); pub struct SecondaryColor(pub Vec4);
impl Default for SecondaryColor { impl Default for SecondaryColor {
fn default() -> Self { fn default() -> Self {
Self(color_hex(0xc9d5e4)) Self(color_hex(0xc9d5e4ff))
} }
} }