rgb

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: 2 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
	G uint8
	B uint8
}

Color represents a color in the RGB color space.

func MustHexRGB

func MustHexRGB(hexstr string) *Color

func NewHexRGB

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

func NewRGB

func NewRGB(r, g, b uint8) *Color

func (*Color) Hex

func (c *Color) Hex() string

func (*Color) RGB

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

func (*Color) SetHex

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

func (*Color) SetRGB

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

Jump to

Keyboard shortcuts

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