Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColourSchemes ¶ added in v0.2.0
func ColourSchemes() []string
Schemes returns the list of schemes that have been registered.
func RegisterColour ¶ added in v0.2.0
func RegisterColour(ctx context.Context, scheme string, init_func ColourInitializationFunc) error
RegisterColour registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `Colour` instances by the `NewColour` method.
Types ¶
type Colour ¶
type Colour interface { Name() string Hex() string Reference() string Closest() []Colour AppendClosest(Colour) error // I don't love this... (20180605/thisisaaronland) String() string }
func NewColour ¶
NewColour returns a new `Colour` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `ColourInitializationFunc` function used to instantiate the new `Colour`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterColour` method.
func NewCommonColour ¶ added in v0.2.0
type ColourInitializationFunc ¶ added in v0.2.0
ColourInitializationFunc is a function defined by individual colour package and used to create an instance of that colour
type CommonColour ¶
type CommonColour struct { Colour `json:",omitempty"` CommonName string `json:"name,omitempty"` CommonHex string `json:"hex"` CommonReference string `json:"reference,omitempty"` CommonClosest []Colour `json:"closest,omitempty"` }
func (*CommonColour) AppendClosest ¶
func (hc *CommonColour) AppendClosest(c Colour) error
func (*CommonColour) Hex ¶
func (hc *CommonColour) Hex() string
func (*CommonColour) Name ¶
func (hc *CommonColour) Name() string
func (*CommonColour) Reference ¶
func (hc *CommonColour) Reference() string
func (*CommonColour) String ¶
func (hc *CommonColour) String() string
Directories
¶
Path | Synopsis |
---|---|
app
|
|
extrude
Command line tool to extrude (derive) dominant colours from one or more images as well as closest matches colours using zero or more "snap-to-grid" colour palettes as JSON-encoded data written to STDOUT.
|
Command line tool to extrude (derive) dominant colours from one or more images as well as closest matches colours using zero or more "snap-to-grid" colour palettes as JSON-encoded data written to STDOUT. |
review
Command-line tool to generate an HTML page (and associated assets) to review the colour extraction for an image using one or more extruders and one or more palettes.
|
Command-line tool to generate an HTML page (and associated assets) to review the colour extraction for an image using one or more extruders and one or more palettes. |
cmd
|
|
extrude
Command line tool to extrude (derive) dominant colours from one or more images as well as closest matches colours using zero or more "snap-to-grid" colour palettes as JSON-encoded data written to STDOUT.
|
Command line tool to extrude (derive) dominant colours from one or more images as well as closest matches colours using zero or more "snap-to-grid" colour palettes as JSON-encoded data written to STDOUT. |
review
Command-line tool to generate an HTML page (and associated assets) to review the colour extraction for an image using one or more extruders and one or more palettes.
|
Command-line tool to generate an HTML page (and associated assets) to review the colour extraction for an image using one or more extruders and one or more palettes. |