pub struct Color {
pub r: f32,
pub g: f32,
pub b: f32,
}Expand description
Linear HDR color.
Fields§
§r: f32§g: f32§b: f32Implementations§
Source§impl Color
impl Color
pub const WHITE: Color
pub const BLACK: Color
pub const RED: Color
pub const GREEN: Color
pub const BLUE: Color
pub const WARM_WHITE: Color
pub const COOL_WHITE: Color
pub const fn new(r: f32, g: f32, b: f32) -> Self
pub fn from_temperature(kelvin: f32) -> Self
pub fn luminance(self) -> f32
pub fn lerp(self, other: Self, t: f32) -> Self
pub fn scale(self, s: f32) -> Self
pub fn to_vec3(self) -> Vec3
pub fn from_hsv(h: f32, s: f32, v: f32) -> Self
Trait Implementations§
impl Copy for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more