hsv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 4 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 {
	H float64
	S float64
	V float64
}

Color represents a color in the HSV color space.

func MustHexHSV

func MustHexHSV(hexstr string) *Color

func NewHSV

func NewHSV(h, s, v float64) *Color

func NewHexHSV

func NewHexHSV(hexstr string) (*Color, error)

func (*Color) B

func (clr *Color) B() uint8

func (*Color) G

func (clr *Color) G() uint8

func (*Color) Hex

func (clr *Color) Hex() string

func (*Color) R

func (clr *Color) R() uint8

func (*Color) RGB

func (clr *Color) RGB() (r, g, b uint8)

func (*Color) SetFromRGB

func (clr *Color) SetFromRGB(rgb rgb.Color)

func (*Color) SetHex

func (clr *Color) SetHex(hex string) error

func (*Color) SetRGB

func (clr *Color) SetRGB(r, g, b uint8)

func (*Color) ToRGB

func (clr *Color) ToRGB() rgb.Color

Jump to

Keyboard shortcuts

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