Struct pdfpdf::Color [] [src]

pub struct Color {
    pub red: u8,
    pub green: u8,
    pub blue: u8,
}

Any color (or grayscale) value that this library can make PDF represent.

Fields

Methods

impl Color
[src]

[src]

Return a color from a RGB colorspace.

Example

let white = Color::rgb(255, 255, 255);
let black = Color::rgb(0, 0, 0);
let red = Color::rgb(255, 0, 0);
let yellow = Color::rgb(255, 255, 0);

[src]

Return a grayscale color value.

Example

let white = Color::gray(255);
let gray = Color::gray(128);

Trait Implementations

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