Skip to content

Commit

Permalink
Color::repeat_opaque
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jul 6, 2024
1 parent 6967a54 commit dee1459
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fyrox-core/src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,16 @@ impl Color {
}
}

#[inline]
pub const fn repeat_opaque(c: u8) -> Self {
Self {
r: c,
g: c,
b: c,
a: 255,
}
}

#[inline]
pub const fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Self {
Self { r, g, b, a }
Expand Down

0 comments on commit dee1459

Please sign in to comment.