color

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RGBModel = color.ModelFunc(rgbModel)
)

Functions

func ColorRGBAu8 added in v0.3.1

func ColorRGBAu8(c color.Color) (r, g, b, a uint8)

func ColorToGray added in v0.3.0

func ColorToGray(c color.Color) color.Gray

func ColorToGray2 added in v0.3.0

func ColorToGray2(c color.Color) color.Gray

func RGBAToGray added in v0.3.0

func RGBAToGray(c color.RGBA) color.Gray

func RGBToGray added in v0.3.0

func RGBToGray(c RGB) color.Gray

Types

type RGB

type RGB struct {
	R, G, B uint8
}

func ColorToRGBu8 added in v0.3.1

func ColorToRGBu8(c color.Color) RGB

func NewRGB

func NewRGB(r, g, b uint8) RGB

func (RGB) RGBA added in v0.3.0

func (c RGB) RGBA() (r, g, b, a uint32)

type RGBu16 added in v0.3.1

type RGBu16 struct {
	R, G, B uint16
}

func NewRGB64 added in v0.3.0

func NewRGB64(r, g, b uint16) RGBu16

func (RGBu16) RGBA added in v0.3.1

func (c RGBu16) RGBA() (r, g, b, a uint32)

Jump to

Keyboard shortcuts

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