Class | Color::Palette::AdobeColor |
In: |
lib/color/palette/adobecolor.rb
|
Parent: | Object |
A class that can read an Adobe Color palette file (used for Photoshop swatches) and provide a Hash-like interface to the contents. Not all colour formats in ACO files are supported. Based largely off the information found by Larry Tesler.
Not all Adobe Color files have named colours; all named entries are returned as an array.
pal = Color::Palette::AdobeColor.from_file(my_aco_palette) pal[0] => Color::RGB<...> pal["white"] => [ Color::RGB<...> ] pal["unknown"] => [ Color::RGB<...>, Color::RGB<...>, ... ]
AdobeColor palettes are always indexable by insertion order (an integer key).
Version 2 palettes use UTF-16 colour names.
lost | [R] | Contains the "lost" colours in the palette. These colours could not be properly loaded (e.g., L*a*b* is not supported by Color, so it is "lost") or are not understood by the algorithms. |
statistics | [R] | Returns statistics about the nature of the colours loaded. |
version | [R] |