f32color

package
v0.0.0-...-5a3b7a3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	White  = color.NRGBA{0xFF, 0xFF, 0xFF, 0xFF}
	Black  = color.NRGBA{0x00, 0x00, 0x00, 0xFF}
	Red    = color.NRGBA{0xFF, 0x00, 0x00, 0xFF}
	Green  = color.NRGBA{0x00, 0xFF, 0x00, 0xFF}
	Blue   = color.NRGBA{0x00, 0x00, 0xFF, 0xFF}
	Yellow = color.NRGBA{0xFF, 0xFF, 0x00, 0xFF}

	Transparent = color.NRGBA{0xFF, 0xFF, 0xFF, 0x00}
)

Functions

func HSL

func HSL(h, s, l float32) color.NRGBA

HSL returns color based on HSL in range 0..1

func HSLA

func HSLA(h, s, l, a float32) color.NRGBA

HSLA returns color based on HSLA in range 0..1

func NRGBAHex

func NRGBAHex(hex uint32) color.NRGBA

func RGB

func RGB(r, g, b float32) color.NRGBA

RGB returns color based on RGB in range 0..1

func RGBA

func RGBA(r, g, b, a float32) color.NRGBA

RGBA returns color based on RGBA in range 0..1

func RGBAFloat

func RGBAFloat(c color.NRGBA) (r, g, b, a float32)

RGBAFloat returns RGBA scaled to 0..1

func RGBALerp

func RGBALerp(a, b color.NRGBA, p float32) color.NRGBA

Lerp linearly interpolates each RGBA component separately

Types

This section is empty.

Jump to

Keyboard shortcuts

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