color

package module
v0.0.0-...-e179562 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	R uint8 // Red
	G uint8 // Green
	B uint8 // Blue
}

func (Color) GetLuminace

func (c Color) GetLuminace() float32

GetLuminace calculates the luminance of the color.

func (Color) GetMaximum

func (c Color) GetMaximum() uint8

GetMaximum gets the max value of the color.

func (Color) GetMean

func (c Color) GetMean() uint8

GetMean returns the average value for all colors.

func (Color) GetMinimum

func (c Color) GetMinimum() uint8

GetMinimum gets the min value of the color.

func (Color) GetProportions

func (c Color) GetProportions() (float32, float32, float32)

GetProportions gets the proportions (percentages) of each color.

func (Color) GetSorted

func (c Color) GetSorted() []uint8

GetSorted gets the values of the colors sorted.

func (Color) GetSortedProportions

func (c Color) GetSortedProportions() []float32

GetSorted gets the values of the colors sorted.

func (Color) IsDark

func (c Color) IsDark() bool

IsDark determins whether the color is dark.

func (Color) IsGray

func (c Color) IsGray() bool

IsGray determines whether the color is grey.

func (Color) IsLight

func (c Color) IsLight() bool

IsLight determins whether the color is light.

Jump to

Keyboard shortcuts

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