Struct gimp_palette::Palette
[−]
[src]
pub struct Palette { /* fields omitted */ }
Methods
impl Palette
[src]
fn new<S: ToString>(
name: S,
colors: Vec<Color>
) -> Result<Self, NewPaletteError>
name: S,
colors: Vec<Color>
) -> Result<Self, NewPaletteError>
Creates a new named Palette from a non-zero-length collection of Colors.
Passing a zero-length collection will result in an Err(NewPaletteError::NoColors)
fn read_from_file<P: AsRef<Path>>(file_path: P) -> Result<Self, NewPaletteError>
Creates a new Palette from a file path. TODO: Decide how to handle the 'Columns' header value.