module

Opal::PaletteFormats

Bidirectional encoders and decoders for palette formats

Class methods

from_gpl(content : String) : Array(Tuple(String, Color))
Source
from_hex(content : String) : Array(Color)
Source
from_pal(content : String) : Array(Color)
Source
to_css(entries : Array(Tuple(String, Color)), prefix : String = "") : String

--- CSS Custom Properties ---

Source
to_gpl(entries : Array(Tuple(String, Color)), palette_name : String = "Opal Palette", columns : Int32 = 8) : String

--- GPL (GIMP Palette) ---

Source
to_hex(colors : Array(Color), with_hash : Bool = true) : String

--- HEX (Plain hex lines) ---

Source
to_json_indexed(colors : Array(Color)) : String
Source
to_json_named(entries : Array(Tuple(String, Color))) : String

--- JSON ---

Source
to_pal(colors : Array(Color)) : String

--- PAL (JASC-PAL) ---

Source