add NamedColor type

This commit is contained in:
Ryan Cavicchioni 2020-02-29 16:09:05 -06:00
parent e9a4d586b4
commit f4013e5672
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -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)
}