fix default colors and color_hex function

This commit is contained in:
griffi-gh 2023-02-09 03:34:49 +01:00
parent 6b34352c55
commit da4a686100
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)]
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])
}

View file

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