Documentation ¶
Overview ¶
Package color defines the Color interface, the ByteColor type which implements it, the Parser interface, and the ByteColorParser type which implements it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteColor ¶
type ByteColor byte
ByteColor represents a color value using a byte. It implements the Color interface.
type ByteColorParser ¶
type ByteColorParser struct {
DefaultColor ByteColor
}
ByteColorParser parses a single-byte string to a ByteColor. It implements the Parser interface.
func (*ByteColorParser) ParseColor ¶
func (parser *ByteColorParser) ParseColor(s string) (Color, error)
ParseColor parses s and returns a Color.
Errors ¶
common.ErrInvalidColor: Will be returned if the color is not recognized by this parser.
Click to show internal directories.
Click to hide internal directories.