Documentation ¶
Overview ¶
Package shades wraps the go-colorful library and uses it to create random shades of a base color. For example you input red as the color, and can return various random shades of red.
Example (Output) ¶
rand.Seed(1) shade := NewFamily(Red) color := shade.Random() fmt.Println(color)
Output: #fc8b79
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFamily ¶
FindFamily returns the name of the family for a given color in a range.
Types ¶
type Color ¶ added in v1.0.1
type Color int64
Color is an enum that makes it easy to reference the pre set color values.
type Family ¶
Family is a set of definitions of shades of a color. It has ranges for Hue, Saturation, and Luminosity. These ranges define a set of colors that can be considered to be shades of the base color. This allows us to generate random color shades based on that base color.
Click to show internal directories.
Click to hide internal directories.