Enum pdf_canvas::graphicsstate::Color [] [src]

pub enum Color {
    // some variants omitted
}

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

Methods

impl Color
[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);

Return a grayscale color value.

Example

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