cmyk

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 {
	C float64
	M float64
	Y float64
	K float64
}

Color represents a color in the CMYK color space.

func MustHexCMYK

func MustHexCMYK(hexstr string) *Color

func NewCMYK

func NewCMYK(c, m, y, k float64) *Color

func NewHexCMYK

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

func (*Color) B

func (c *Color) B() uint8

func (*Color) G

func (c *Color) G() uint8

func (*Color) Hex

func (c *Color) Hex() string

func (*Color) R

func (c *Color) R() uint8

func (*Color) RGB

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

func (*Color) SetFromRGB

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

func (*Color) SetHex

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

func (*Color) SetRGB

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

func (*Color) ToRGB

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

Jump to

Keyboard shortcuts

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