Struct crayon::utils::Color [] [src]

pub struct Color(pub f32, pub f32, pub f32, pub f32);

A RGBA Color. Each color component is a floating point value with a range from 0 to 1.

Methods

impl Color
[src]

[src]

Creates Color from a u32 encoded ARGB.

[src]

Creates Color from a u32 encoded ABGR.

[src]

Returns the grayscale representation of RGB values.

[src]

Clip to [0.0, 1.0] range.

[src]

Truncate alpha channel.

impl Color
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl Debug for Color
[src]

[src]

Formats the value using the given formatter.

impl Default for Color
[src]

[src]

Returns the "default value" for a type. Read more

impl Copy for Color
[src]

impl Clone for Color
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Color
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Into<u32> for Color
[src]

[src]

Performs the conversion.

impl From<u32> for Color
[src]

[src]

Performs the conversion.

impl Into<[u8; 4]> for Color
[src]

[src]

Performs the conversion.

impl From<[u8; 4]> for Color
[src]

[src]

Performs the conversion.

impl Into<[f32; 4]> for Color
[src]

[src]

Performs the conversion.