Struct three_d::core::Color [−][src]
Expand description
Represents a color composed of a red, green and blue component. In addition, the alpha value determines the how transparent the color is (0 is fully transparent and 255 is fully opaque).
Fields
r: u8
Red component
g: u8
Green component
b: u8
Blue component
a: u8
Alpha component
Implementations
Creates a new color with the given r, g and b values and an alpha value of 255.
Creates a new color from three float elements where each element are in the range 0.0..=1.0
.
Creates a new color from four float elements where each element are in the range 0.0..=1.0
.
Convert to Vec3
by mapping the red, green and blue component to the range 0.0..=1.0
.
Convert to a slice by mapping the red, green and blue component to the range 0.0..=1.0
.
Convert to a slice by mapping each component to the range 0.0..=1.0
.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Color
impl UnwindSafe for Color
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more