ty_math/ty_rgba_color.rs
1/// An RGBA color with `f32` components.
2#[derive(Clone, Copy, Debug, Default, PartialEq)]
3pub struct TyRgbaColor {
4 pub r: f32,
5 pub g: f32,
6 pub b: f32,
7 pub a: f32,
8}
9
10impl TyRgbaColor {
11 /// Creates a new color from `r`, `g`, `b`, and `a` components.
12 pub fn new(r: f32, g: f32, b: f32, a: f32) -> Self {
13 Self { r, g, b, a }
14 }
15}