Documentation
¶
Index ¶
- Variables
- func GenerateCustomColors(primary color.ARGB) (map[string]CustomColor, error)
- func GetPixelsFromImage(img image.Image) []color.ARGB
- type Colors
- func GenerateFromImage(ctx context.Context, img image.Image, cfg Config) (Colors, []color.ARGB, error)
- func GenerateFromPixels(ctx context.Context, pixels []color.ARGB, cfg Config) (Colors, []color.ARGB, error)
- func GenerateFromQuantized(quantized Quantized, cfg Config) (Colors, []color.ARGB, error)
- type Config
- type CustomColor
- type Quantized
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoColorFound = errors.New("no color found")
ErrNoColorFound means no color found from imput image.
Functions ¶
func GenerateCustomColors ¶
func GenerateCustomColors(primary color.ARGB) (map[string]CustomColor, error)
GenerateCustomColors returns all custom colors.
Types ¶
type Colors ¶
Colors is key and color.
func GenerateFromImage ¶
func GenerateFromImage( ctx context.Context, img image.Image, cfg Config, ) (Colors, []color.ARGB, error)
GenerateFromImage colors from an image.Image.
type Config ¶
type Config struct {
Variant dynamic.Variant
Platform dynamic.Platform
Version dynamic.Version
Dark bool
Constrast float64
}
Config is configuration used to generate colors.
Click to show internal directories.
Click to hide internal directories.