colour

package module
v0.0.0-...-bf5e8ba Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

Colour

GitHub

A golang lib to work with RGB HSV and HEX.

go get github.com/MrMip/colour

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexrgbFormat

func HexrgbFormat(input Hexrgb) string

func RgbGetSat

func RgbGetSat(input Rgb) float32

func RgbGetValue

func RgbGetValue(input Rgb) float32

R' = R/255 Cmax = max(R',G',B') V = Cmax

Types

type Hexrgb

type Hexrgb struct {
	Red   string
	Green string
	Blue  string
}

func RgbTOhexgb

func RgbTOhexgb(input Rgb) Hexrgb

type Hsv

type Hsv struct {
	Hue   int
	Sat   float32
	Value float32
}

func RgbTOhsv

func RgbTOhsv(input Rgb) Hsv

type Rgb

type Rgb struct {
	Red   int
	Green int
	Blue  int
}

func ChangeValue

func ChangeValue(input Rgb, amount int) Rgb

max + 3 rest + 1

func RandRGB

func RandRGB() Rgb

Jump to

Keyboard shortcuts

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