Versions in this module Expand all Collapse all v0 v0.3.0 Jun 18, 2021 Changes in this version + const CountSpecialColors + const SpecialColorRemover + const SpecialColorTransparent + var MaxColorsInMask = 64 + type Color struct + Index int + Val uint64 + func NewColor(val uint64, index int) Color + type ColorContainer struct + Colors []Color + func (c *ColorContainer) Add(color Color) + func (c *ColorContainer) Contains(needColor Color) bool + func (c *ColorContainer) Empty() bool + func (c *ColorContainer) String(palette *Palette, withHighlights ColorMasks) string + type ColorMask Color + type ColorMasks []ColorMask + func NewColorMasks(colors []Color) ColorMasks + func NewEmptyColorMasks() ColorMasks + func (masks ColorMasks) Add(color Color) ColorMasks + func (masks ColorMasks) Contains(color Color) bool + type Config struct + Palette [][]map[string]string + type Palette struct + ColorNamesMapping map[string]Color + Rulesets []Ruleset + func NewPalette() *Palette + func OpenPaletteFromFile(path string) (*Palette, error) + func ReadPaletteFileYAML(data []byte) (*Palette, error) + func (p *Palette) AddRuleset(ruleset Ruleset) + func (p *Palette) ColorExists(colorName string) bool + func (p *Palette) GetColorByName(colorName string) Color + func (p *Palette) GetNameByColor(needColor Color) string + func (p *Palette) RegisterColorName(colorName string) Color + type Rule struct + Colors []Color + Error string + Masks ColorMasks + func NewRule(colors []Color, error string) *Rule + func (r *Rule) ContainsIn(colorMasks ColorMasks) bool + func (r *Rule) IsError() bool + func (r *Rule) String(palette *Palette) string + type Ruleset []*Rule + func NewRuleset(rules ...*Rule) Ruleset