Struct bracket_terminal::prelude::RGBA [−][src]
Expand description
Represents an R/G/B triplet, in the range 0..1 (32-bit float)
Fields
r: f32g: f32b: f32a: f32Implementations
Constructs a new RGB color, from 3 32-bit floats in the range 0..1
Constructs a new RGB color, from 3 bytes in the range 0..255
Construct an RGB color from a tuple of u8, or a named constant
Constructs from an HTML color code (e.g. “#eeffeeff”)
Errors
Applies a quick grayscale conversion to the color
Applies a lengthier desaturate (via HSV) to the color
Lerps by a specified percentage (from 0 to 1) between this color and another
Lerps only the alpha channel, by a specified percentage (from 0 to 1) between this color and another
Trait Implementations
Support adding an RGB to a color. The result is clamped via the constructor.
Support adding a float to a color. The result is clamped via the constructor.
Support conversion from a color tuple
Support conversion from a color tuple
Support conversion from HSV
Support conversion from RGB
Support conversion from RGBA
Support conversion from RGBA
Support multiplying a color by another color. The result is clamped via the constructor.
Support multiplying a color by a float. The result is clamped via the constructor.
Support subtracting an RGB from a color. The result is clamped via the constructor.
Support subtracting a float from a color. The result is clamped via the constructor.
Auto Trait Implementations
impl RefUnwindSafe for RGBAimpl UnwindSafe for RGBABlanket Implementations
Mutably borrows from an owned value. Read more