color

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 0 Imported by: 64

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	// Red is the amount of red
	Red int
	// Green is the amount of red
	Green int
	// Blue is the amount of red
	Blue int
}

Color represents a color in the RGB (Red, Green, Blue) space, is possible mix values, when all values are 0 the result color is black when all values are 255 the result color is white.

func NewBlack added in v0.34.0

func NewBlack() Color

NewBlack return a Color with all components (red, green and blue) as 0.

func NewWhite

func NewWhite() Color

NewWhite return a Color with all components (red, green and blue) as 255.

func (*Color) IsWhite

func (s *Color) IsWhite() bool

IsWhite from Color will return true if all components of color. are in the maximum value.

Jump to

Keyboard shortcuts

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