img

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

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RGB

type RGB uint32

RGB color without Alpha (24 lower bits)

func (RGB) Blue

func (c RGB) Blue() uint8

Blue component of a color

func (*RGB) DistanceTo

func (c *RGB) DistanceTo(o RGB) int

DistanceTo another color. It calculates Manhattan distance

func (RGB) Green

func (c RGB) Green() uint8

Green component of a color

func (RGB) RGBA

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

RGBA implements color.Color interface TODO: inline the same formula as color.NRGBA item

func (RGB) Red

func (c RGB) Red() uint8

Red component of a color

func (RGB) String

func (c RGB) String() string

String representation in the form of hexadecimal #RRGGBB

Jump to

Keyboard shortcuts

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