Documentation ¶
Overview ¶
Package schemes provides standard color schemes from gheat.
These color schemes were converted from the pngs from gheat are made available for your convenience.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AlphaFire []color.Color
AlphaFire is a gradient color scheme from transparent through red to yellow then white.
var Classic []color.Color
Classic is a color scheme that goes through a variety of colors.
var Fire []color.Color
Fire is a gradient color scheme from grey to white through red and yellow.
var OMG []color.Color
OMG is a gradient color scheme from purple through red to white.
var PBJ []color.Color
PBJ is a gradient color scheme from orange to purple.
var PGAitch []color.Color
PGAitch is a gradient color scheme from a dismal dark to a bright yellow.
Functions ¶
func Build ¶
func Build(spec SchemeSpec) []color.Color
Build generates a heatmap color scheme smoothly across the given scheme ranges.
Types ¶
type SchemeRange ¶
type SchemeRange struct { // The starting color for this range From color.Color // The ending color for this range To color.Color // The number of colors to which this range should expand Steps int }
A SchemeRange is a color range for computing a scheme.
type SchemeSpec ¶
type SchemeSpec []SchemeRange
A SchemeSpec is a color generator specification.
Basically, this is just a bunch of start/stop points and colors along a range.
func (SchemeSpec) At ¶
func (ss SchemeSpec) At(x, y int) color.Color
At satisfies the image.Image interface.
func (SchemeSpec) Bounds ¶
func (ss SchemeSpec) Bounds() image.Rectangle
Bounds satisfies the image.Image interface.
func (SchemeSpec) ColorModel ¶
func (ss SchemeSpec) ColorModel() color.Model
ColorModel satisfies the image.Image interface.