Documentation ¶
Overview ¶
Package colorrange holds distributions that accept and return color.Colors
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Linear ¶
type Linear struct {
// contains filtered or unexported fields
}
Linear color ranges return colors on a linear distribution
func (Linear) EnforceRange ¶
EnforceRange rounds the input color's components so that they fall in the given range.
func (Linear) Percentile ¶
Percentile returns a color f percent along the color range
type Linear64 ¶
type Linear64 struct {
// contains filtered or unexported fields
}
Linear64 color ranges return colors on a linear distribution
func (Linear64) EnforceRange ¶
EnforceRange rounds the input color's components so that they fall in the given range.
func (Linear64) Percentile ¶
Percentile returns a color f percent along the color range
type Range ¶
type Range interface { Poll() color.Color InRange(color.Color) bool EnforceRange(color.Color) color.Color Percentile(f float64) color.Color }
Range represents a range of colors
func NewLinear64 ¶
NewLinear64 returns a linear color distribution between min and maxColor
Click to show internal directories.
Click to hide internal directories.