color

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {

	// RequiredBits returns the minimum amount of bits required to map the entire colorspace provided
	// by this generator.
	RequiredBits() uint

	// Generate returns a color for a given arbitrarily sized code.
	Generate(code uint64) colorful.Color
}

Generator provides colors for icons based on an arbitrary input value as found within a hash.

func HSL

func HSL(saturation float64, lightness float64) Generator

func HSV

func HSV(saturation float64, value float64) Generator

func Static

func Static(color colorful.Color) Generator

Static returns a color generator which always returns the same value regardless of the input code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL