add NamedColor type
This commit is contained in:
parent
e9a4d586b4
commit
f4013e5672
6
color.go
6
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user