Type Alias graphics::types::Color

source ·
pub type Color = [ColorComponent; 4];
Expand description

[red, green, blue, alpha]

All values are between 0.0 and 1.0. For example, black is [0.0, 0.0, 0.0, 1.0] and white is [1.0, 1.0, 1.0, 1.0].

Trait Implementations§

source§

impl Colored for Color

source§

fn mul_rgba( self, r: ColorComponent, g: ColorComponent, b: ColorComponent, a: ColorComponent ) -> Self

Multiplies with red, green, blue and alpha values.
source§

fn hue_rad(self, angle: ColorComponent) -> Self

Rotates hue by radians.
source§

fn tint(self, f: ColorComponent) -> Self

Mixes the current color with white. Read more
source§

fn shade(self, f: ColorComponent) -> Self

Mixes the current color with black. Read more
source§

fn hue_deg(self, angle: ColorComponent) -> Self

Rotates hue by degrees.