pub struct Color {
pub r: f32,
pub g: f32,
pub b: f32,
pub a: f32,
}
Expand description
Red channel. Should be in range from 0 to 1.
Green channel. Should be in range from 0 to 1.
Blue channel. Should be in range from 0 to 1.
Alpha channel. Should be in range from 0 to 1.
RGB Constructor, values should be in range from 0 to 1. Alpha will be 1.
RGBA Constructor. Values should be in range from 0 to 1.
Red color (r: 1.0, g: 0.0, b: 0.0)
Green color (r: 0.0, g: 1.0, b: 0.0)
Blue color (r: 0.0, g: 0.0, b: 1.0)
Cyan color (r: 0.0, g: 1.0, b: 1.0)
Magenta color (r: 1.0, g: 0.0, b: 1.0)
Yellow color (r: 1.0, g: 1.0, b: 0.0)
White color (r: 1.0, g: 1.0, b: 1.0)
Black color (r: 0.0, g: 0.0, b: 0.0)
Orange color (r: 1.0, g: 0.5, b: 0.0)
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Multiply Color by f32. Result is not clamped.
The resulting type after applying the *
operator.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T> Downcast<T> for T
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.