Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GoogleBlue color.ARGB = 0xff4285f4 // #4285f4
GoogleBlue is Google's Blue color as ARGB
Functions ¶
func Score ¶
Score ranks colors based on suitability for being used for a UI theme.
colorsToPopulation: map with keys of colors and values of how often the color appears, usually from a source image. options: optional parameters for customizing scoring behavior.
Returns Colors sorted by suitability for a UI theme. The most suitable color is the first item, the least suitable is the last. There will always be at least one color returned. If all the input colors were not suitable for a theme, a default fallback color will be provided, Google Blue.
Types ¶
type Option ¶
type Option func(*options)
Option is a function that modifies the underlying options
func WithFallback ¶
WithFallback sets a fallback color if no color has been found
func WithFilter ¶
func WithFilter() Option
WithFilter sets if the resulting colors should be filtered to not include hues that are not used often enough, and colors that are effectively grayscale.