color

package
v0.0.0-...-0518d83 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HSVToRGB

func HSVToRGB(h, s, v float32) (r, g, b float32)

func PackFloat

func PackFloat(r, g, b, a float32) float32

func PackInt

func PackInt(r, g, b, a float32) uint32

func RGBToHSV

func RGBToHSV(r, g, b float32) (h, s, v float32)

Types

type Color

type Color struct {
	R, G, B, A float32
}

func NewHSV

func NewHSV(h, s, v float32) Color

func NewHSVA

func NewHSVA(h, s, v, a float32) Color

func NewIRGB

func NewIRGB(r, g, b uint8) Color

func NewIRGBA

func NewIRGBA(r, g, b, a uint8) Color

func NewL

func NewL(lightness float32) Color

func NewLA

func NewLA(lightness, a float32) Color

func NewRGB

func NewRGB(r, g, b float32) Color

func NewRGBA

func NewRGBA(r, g, b, a float32) Color

func (Color) Darken

func (c Color) Darken(amount float32) Color

func (Color) GetHue

func (c Color) GetHue() float32

func (Color) Lighten

func (c Color) Lighten(amount float32) Color

func (Color) Lighten2

func (c Color) Lighten2(amount float32) Color

func (Color) Mix

func (c Color) Mix(c1 Color, t float32) Color

func (Color) Mul

func (c Color) Mul(c1 Color) Color

func (Color) PackFloat

func (c Color) PackFloat() float32

func (Color) PackInt

func (c Color) PackInt() uint32

func (Color) Shade

func (c Color) Shade(amount float32) Color

func (Color) Shade2

func (c Color) Shade2(amount float32) Color

func (Color) Shift

func (c Color) Shift(h, s, v float32) Color

func (Color) ToArray

func (c Color) ToArray() []float32

func (Color) ToVec4

func (c Color) ToVec4() mgl32.Vec4

Jump to

Keyboard shortcuts

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