diff --git a/color.go b/color.go index 86550b7..15d6cdc 100644 --- a/color.go +++ b/color.go @@ -20,6 +20,8 @@ type ( H, K int16 S, B float32 } + + NamedColor string ) func NewRGBColor(r, g, b uint8) (*RGBColor, error) { @@ -60,3 +62,7 @@ func (c HSBKColor) ColorString() string { func (c HSBKColor) MarshalText() ([]byte, error) { return []byte(c.ColorString()), nil } + +func (c NamedColor) ColorString() string { + return string(c) +}