color

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: AGPL-3.0 Imports: 1 Imported by: 46

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Auto = Color{255, 0, 0, 0, true}
View Source
var Blue = Color{255, 0, 0, 255, false}
View Source
var Green = Color{255, 0, 255, 0, false}
View Source
var LightGray = Color{255, 0xC0, 0xC0, 0xC0, false}
View Source
var Red = Color{255, 255, 0, 0, false}

Functions

This section is empty.

Types

type Color

type Color struct {
	// contains filtered or unexported fields
}

Color is a 24 bit color that can be converted to internal ECMA-376 formats as needed.

func FromHex

func FromHex(s string) Color

func RGB

func RGB(r, g, b uint8) Color

RGB constructs a new RGB color with a given red, green and blue value.

func (Color) AsRGBAString

func (c Color) AsRGBAString() *string

AsRGBAString is used by the various wrappers to return a pointer to a string containing a six digit hex RGB value.

func (Color) AsRGBString

func (c Color) AsRGBString() *string

AsRGBString is used by the various wrappers to return a pointer to a string containing a six digit hex RGB value.

func (Color) IsAuto

func (c Color) IsAuto() bool

IsAuto returns true if the color is the 'Auto' type. If the field doesn't support an Auto color, then black is used.

Jump to

Keyboard shortcuts

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