Documentation
¶
Overview ¶
Package rgoybiv is a port of the python package https://github.com/givp/RoyGBiv
Index ¶
Constants ¶
View Source
const ( N_QUANTIZED = 100 MIN_DISTANCE = 10.0 MIN_PROMINENCE = 0.01 MIN_SATURATION = 0.05 MAX_COLORS = 5 BACKGROUND_PROMINENCE = 0.5 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ColorProminence ¶
type ColorProminences ¶
type ColorProminences []ColorProminence
func (ColorProminences) Len ¶
func (a ColorProminences) Len() int
func (ColorProminences) Less ¶
func (a ColorProminences) Less(i, j int) bool
func (ColorProminences) Swap ¶
func (a ColorProminences) Swap(i, j int)
type Options ¶
type Options struct { // start with an adaptive palette of this size NQuantized int // min distance to consider two colors different MinDistance float64 // ignore if less than this proportion of image MinProminence float64 // ignore if not saturated enough MinSaturation float64 // keep only this many colors MaxColors int // level of Prominence indicating a bg color BackgroundProminence float32 }
type Palette ¶
type Palette struct { Colors ColorProminences Background color.Color }
Click to show internal directories.
Click to hide internal directories.