HexColor

Structin image_optimizerfastly 0.13.1View source
pub struct HexColor {
pub r: u8,
pub g: u8,
pub b: u8,
pub a: f32,
}

A hexadecimal color specification.

Fields

r

u8

Amount of red.

g

u8

Amount of green.

b

u8

Amount of blue.

a

f32

Alpha channel parameter.

This value should be between 0 (fully transparent) and 1 (fully opaque).

Trait implementations

impl Clone for HexColor

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for HexColor

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Parameters

self: &Self
f: &mut $crate::fmt::Formatter

Returns

$crate::fmt::Result

impl Serialize for HexColor

serialize

View source
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,

Parameters

self: &Self
serializer: S

Returns

Result<S::Ok, S::Error>

Auto trait implementations

Blanket implementations