module
Opal::PaletteFormats
Overview
Bidirectional encoders and decoders for palette formats
Defined in:
opal/style/palette_formats.crClass Method Summary
- .from_gpl(content : String) : Array(Tuple(String, Color))
- .from_hex(content : String) : Array(Color)
- .from_pal(content : String) : Array(Color)
-
.to_css(entries : Array(Tuple(String, Color)), prefix : String = "") : String
--- CSS Custom Properties ---
-
.to_gpl(entries : Array(Tuple(String, Color)), palette_name : String = "Opal Palette", columns : Int32 = 8) : String
--- GPL (GIMP Palette) ---
-
.to_hex(colors : Array(Color), with_hash : Bool = true) : String
--- HEX (Plain hex lines) ---
- .to_json_indexed(colors : Array(Color)) : String
-
.to_json_named(entries : Array(Tuple(String, Color))) : String
--- JSON ---
-
.to_pal(colors : Array(Color)) : String
--- PAL (JASC-PAL) ---
Class Method Detail
--- CSS Custom Properties ---
def self.to_gpl(entries : Array(Tuple(String, Color)), palette_name : String = "Opal Palette", columns : Int32 = 8) : String
#
--- GPL (GIMP Palette) ---
--- HEX (Plain hex lines) ---