Trait bevy_color::prelude::Gray

source ·
pub trait Gray: Mix + Sized {
    const BLACK: Self;
    const WHITE: Self;

    // Provided method
    fn gray(lightness: f32) -> Self { ... }
}
Expand description

Trait for returning a grayscale color of a provided lightness.

Required Associated Constants§

source

const BLACK: Self

A pure black color.

source

const WHITE: Self

A pure white color.

Provided Methods§

source

fn gray(lightness: f32) -> Self

Returns a grey color with the provided lightness from (0.0 - 1.0). 0 is black, 1 is white.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Gray for Hsla

source§

const BLACK: Self = _

source§

const WHITE: Self = _

source§

impl Gray for Hsva

source§

const BLACK: Self = _

source§

const WHITE: Self = _

source§

impl Gray for Hwba

source§

const BLACK: Self = _

source§

const WHITE: Self = _

source§

impl Gray for Laba

source§

const BLACK: Self = _

source§

const WHITE: Self = _

source§

impl Gray for Lcha

source§

const BLACK: Self = _

source§

const WHITE: Self = _

source§

impl Gray for LinearRgba

source§

const BLACK: Self = Self::BLACK

source§

const WHITE: Self = Self::WHITE

source§

impl Gray for Oklaba

source§

const BLACK: Self = _

source§

const WHITE: Self = _

source§

impl Gray for Oklcha

source§

const BLACK: Self = _

source§

const WHITE: Self = _

source§

impl Gray for Srgba

source§

const BLACK: Self = Self::BLACK

source§

const WHITE: Self = Self::WHITE

source§

impl Gray for Xyza

source§

const BLACK: Self = _

source§

const WHITE: Self = _