color

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package color provides color handling structures and functions for use across all of the document types.

Index

Constants

This section is empty.

Variables

View Source
var AliceBlue = Color{0xF0, 0xF8, 0xFF, 255, false}
View Source
var AntiqueWhite = Color{0xFA, 0xEB, 0xD7, 255, false}
View Source
var Aqua = Color{0x00, 0xFF, 0xFF, 255, false}
View Source
var Aquamarine = Color{0x7F, 0xFF, 0xD4, 255, false}
View Source
var Auto = Color{0, 0, 0, 255, true}

Auto translates to an 'auto' tag in places where it's legal.

View Source
var Azure = Color{0xF0, 0xFF, 0xFF, 255, false}
View Source
var Beige = Color{0xF5, 0xF5, 0xDC, 255, false}
View Source
var Bisque = Color{0xFF, 0xE4, 0xC4, 255, false}
View Source
var Black = Color{0x00, 0x00, 0x00, 255, false}
View Source
var BlanchedAlmond = Color{0xFF, 0xEB, 0xCD, 255, false}
View Source
var Blue = Color{0x00, 0x00, 0xFF, 255, false}
View Source
var BlueViolet = Color{0x8A, 0x2B, 0xE2, 255, false}
View Source
var Brown = Color{0xA5, 0x2A, 0x2A, 255, false}
View Source
var BurlyWood = Color{0xDE, 0xB8, 0x87, 255, false}
View Source
var CadetBlue = Color{0x5F, 0x9E, 0xA0, 255, false}
View Source
var Chartreuse = Color{0x7F, 0xFF, 0x00, 255, false}
View Source
var Chocolate = Color{0xD2, 0x69, 0x1E, 255, false}
View Source
var Coral = Color{0xFF, 0x7F, 0x50, 255, false}
View Source
var CornflowerBlue = Color{0x64, 0x95, 0xED, 255, false}
View Source
var Cornsilk = Color{0xFF, 0xF8, 0xDC, 255, false}
View Source
var Crimson = Color{0xDC, 0x14, 0x3C, 255, false}
View Source
var Cyan = Color{0x00, 0xFF, 0xFF, 255, false}
View Source
var DarkBlue = Color{0x00, 0x00, 0x8B, 255, false}
View Source
var DarkCyan = Color{0x00, 0x8B, 0x8B, 255, false}
View Source
var DarkGoldenRod = Color{0xB8, 0x86, 0x0B, 255, false}
View Source
var DarkGray = Color{0xA9, 0xA9, 0xA9, 255, false}
View Source
var DarkGreen = Color{0x00, 0x64, 0x00, 255, false}
View Source
var DarkGrey = Color{0xA9, 0xA9, 0xA9, 255, false}
View Source
var DarkKhaki = Color{0xBD, 0xB7, 0x6B, 255, false}
View Source
var DarkMagenta = Color{0x8B, 0x00, 0x8B, 255, false}
View Source
var DarkOliveGreen = Color{0x55, 0x6B, 0x2F, 255, false}
View Source
var DarkOrange = Color{0xFF, 0x8C, 0x00, 255, false}
View Source
var DarkOrchid = Color{0x99, 0x32, 0xCC, 255, false}
View Source
var DarkRed = Color{0x8B, 0x00, 0x00, 255, false}
View Source
var DarkSalmon = Color{0xE9, 0x96, 0x7A, 255, false}
View Source
var DarkSeaGreen = Color{0x8F, 0xBC, 0x8F, 255, false}
View Source
var DarkSlateBlue = Color{0x48, 0x3D, 0x8B, 255, false}
View Source
var DarkSlateGray = Color{0x2F, 0x4F, 0x4F, 255, false}
View Source
var DarkSlateGrey = Color{0x2F, 0x4F, 0x4F, 255, false}
View Source
var DarkTurquoise = Color{0x00, 0xCE, 0xD1, 255, false}
View Source
var DarkViolet = Color{0x94, 0x00, 0xD3, 255, false}
View Source
var DeepPink = Color{0xFF, 0x14, 0x93, 255, false}
View Source
var DeepSkyBlue = Color{0x00, 0xBF, 0xFF, 255, false}
View Source
var DimGray = Color{0x69, 0x69, 0x69, 255, false}
View Source
var DimGrey = Color{0x69, 0x69, 0x69, 255, false}
View Source
var DodgerBlue = Color{0x1E, 0x90, 0xFF, 255, false}
View Source
var FireBrick = Color{0xB2, 0x22, 0x22, 255, false}
View Source
var FloralWhite = Color{0xFF, 0xFA, 0xF0, 255, false}
View Source
var ForestGreen = Color{0x22, 0x8B, 0x22, 255, false}
View Source
var Fuchsia = Color{0xFF, 0x00, 0xFF, 255, false}
View Source
var Gainsboro = Color{0xDC, 0xDC, 0xDC, 255, false}
View Source
var GhostWhite = Color{0xF8, 0xF8, 0xFF, 255, false}
View Source
var Gold = Color{0xFF, 0xD7, 0x00, 255, false}
View Source
var GoldenRod = Color{0xDA, 0xA5, 0x20, 255, false}
View Source
var Gray = Color{0x80, 0x80, 0x80, 255, false}
View Source
var Green = Color{0x00, 0x80, 0x00, 255, false}
View Source
var GreenYellow = Color{0xAD, 0xFF, 0x2F, 255, false}
View Source
var HoneyDew = Color{0xF0, 0xFF, 0xF0, 255, false}
View Source
var HotPink = Color{0xFF, 0x69, 0xB4, 255, false}
View Source
var IndianRed = Color{0xCD, 0x5C, 0x5C, 255, false}
View Source
var Indigo = Color{0x4B, 0x00, 0x82, 255, false}
View Source
var Ivory = Color{0xFF, 0xFF, 0xF0, 255, false}
View Source
var Khaki = Color{0xF0, 0xE6, 0x8C, 255, false}
View Source
var Lavender = Color{0xE6, 0xE6, 0xFA, 255, false}
View Source
var LavenderBlush = Color{0xFF, 0xF0, 0xF5, 255, false}
View Source
var LawnGreen = Color{0x7C, 0xFC, 0x00, 255, false}
View Source
var LemonChiffon = Color{0xFF, 0xFA, 0xCD, 255, false}
View Source
var LightBlue = Color{0xAD, 0xD8, 0xE6, 255, false}
View Source
var LightCoral = Color{0xF0, 0x80, 0x80, 255, false}
View Source
var LightCyan = Color{0xE0, 0xFF, 0xFF, 255, false}
View Source
var LightGoldenRodYellow = Color{0xFA, 0xFA, 0xD2, 255, false}
View Source
var LightGray = Color{0xD3, 0xD3, 0xD3, 255, false}
View Source
var LightGreen = Color{0x90, 0xEE, 0x90, 255, false}
View Source
var LightGrey = Color{0xD3, 0xD3, 0xD3, 255, false}
View Source
var LightPink = Color{0xFF, 0xB6, 0xC1, 255, false}
View Source
var LightSalmon = Color{0xFF, 0xA0, 0x7A, 255, false}
View Source
var LightSeaGreen = Color{0x20, 0xB2, 0xAA, 255, false}
View Source
var LightSkyBlue = Color{0x87, 0xCE, 0xFA, 255, false}
View Source
var LightSlateGray = Color{0x77, 0x88, 0x99, 255, false}
View Source
var LightSlateGrey = Color{0x77, 0x88, 0x99, 255, false}
View Source
var LightSteelBlue = Color{0xB0, 0xC4, 0xDE, 255, false}
View Source
var LightYellow = Color{0xFF, 0xFF, 0xE0, 255, false}
View Source
var Lime = Color{0x00, 0xFF, 0x00, 255, false}
View Source
var LimeGreen = Color{0x32, 0xCD, 0x32, 255, false}
View Source
var Linen = Color{0xFA, 0xF0, 0xE6, 255, false}
View Source
var Magenta = Color{0xFF, 0x00, 0xFF, 255, false}
View Source
var Maroon = Color{0x80, 0x00, 0x00, 255, false}
View Source
var MediumAquaMarine = Color{0x66, 0xCD, 0xAA, 255, false}
View Source
var MediumBlue = Color{0x00, 0x00, 0xCD, 255, false}
View Source
var MediumOrchid = Color{0xBA, 0x55, 0xD3, 255, false}
View Source
var MediumPurple = Color{0x93, 0x70, 0xDB, 255, false}
View Source
var MediumSeaGreen = Color{0x3C, 0xB3, 0x71, 255, false}
View Source
var MediumSlateBlue = Color{0x7B, 0x68, 0xEE, 255, false}
View Source
var MediumSpringGreen = Color{0x00, 0xFA, 0x9A, 255, false}
View Source
var MediumTurquoise = Color{0x48, 0xD1, 0xCC, 255, false}
View Source
var MediumVioletRed = Color{0xC7, 0x15, 0x85, 255, false}
View Source
var MidnightBlue = Color{0x19, 0x19, 0x70, 255, false}
View Source
var MintCream = Color{0xF5, 0xFF, 0xFA, 255, false}
View Source
var MistyRose = Color{0xFF, 0xE4, 0xE1, 255, false}
View Source
var Moccasin = Color{0xFF, 0xE4, 0xB5, 255, false}
View Source
var NavajoWhite = Color{0xFF, 0xDE, 0xAD, 255, false}
View Source
var Navy = Color{0x00, 0x00, 0x80, 255, false}
View Source
var OldLace = Color{0xFD, 0xF5, 0xE6, 255, false}
View Source
var Olive = Color{0x80, 0x80, 0x00, 255, false}
View Source
var OliveDrab = Color{0x6B, 0x8E, 0x23, 255, false}
View Source
var Orange = Color{0xFF, 0xA5, 0x00, 255, false}
View Source
var OrangeRed = Color{0xFF, 0x45, 0x00, 255, false}
View Source
var Orchid = Color{0xDA, 0x70, 0xD6, 255, false}
View Source
var PaleGoldenRod = Color{0xEE, 0xE8, 0xAA, 255, false}
View Source
var PaleGreen = Color{0x98, 0xFB, 0x98, 255, false}
View Source
var PaleTurquoise = Color{0xAF, 0xEE, 0xEE, 255, false}
View Source
var PaleVioletRed = Color{0xDB, 0x70, 0x93, 255, false}
View Source
var PapayaWhip = Color{0xFF, 0xEF, 0xD5, 255, false}
View Source
var PeachPuff = Color{0xFF, 0xDA, 0xB9, 255, false}
View Source
var Peru = Color{0xCD, 0x85, 0x3F, 255, false}
View Source
var Pink = Color{0xFF, 0xC0, 0xCB, 255, false}
View Source
var Plum = Color{0xDD, 0xA0, 0xDD, 255, false}
View Source
var PowderBlue = Color{0xB0, 0xE0, 0xE6, 255, false}
View Source
var Purple = Color{0x80, 0x00, 0x80, 255, false}
View Source
var RebeccaPurple = Color{0x66, 0x33, 0x99, 255, false}
View Source
var Red = Color{0xFF, 0x00, 0x00, 255, false}
View Source
var RosyBrown = Color{0xBC, 0x8F, 0x8F, 255, false}
View Source
var RoyalBlue = Color{0x41, 0x69, 0xE1, 255, false}
View Source
var SaddleBrown = Color{0x8B, 0x45, 0x13, 255, false}
View Source
var Salmon = Color{0xFA, 0x80, 0x72, 255, false}
View Source
var SandyBrown = Color{0xF4, 0xA4, 0x60, 255, false}
View Source
var SeaGreen = Color{0x2E, 0x8B, 0x57, 255, false}
View Source
var SeaShell = Color{0xFF, 0xF5, 0xEE, 255, false}
View Source
var Sienna = Color{0xA0, 0x52, 0x2D, 255, false}
View Source
var Silver = Color{0xC0, 0xC0, 0xC0, 255, false}
View Source
var SkyBlue = Color{0x87, 0xCE, 0xEB, 255, false}
View Source
var SlateBlue = Color{0x6A, 0x5A, 0xCD, 255, false}
View Source
var SlateGray = Color{0x70, 0x80, 0x90, 255, false}
View Source
var SlateGrey = Color{0x70, 0x80, 0x90, 255, false}
View Source
var Snow = Color{0xFF, 0xFA, 0xFA, 255, false}
View Source
var SpringGreen = Color{0x00, 0xFF, 0x7F, 255, false}
View Source
var SteelBlue = Color{0x46, 0x82, 0xB4, 255, false}
View Source
var SuccessGreen = Color{0x00, 0xCC, 0x00, 255, false}
View Source
var Tan = Color{0xD2, 0xB4, 0x8C, 255, false}
View Source
var Teal = Color{0x00, 0x80, 0x80, 255, false}
View Source
var Thistle = Color{0xD8, 0xBF, 0xD8, 255, false}
View Source
var Tomato = Color{0xFF, 0x63, 0x47, 255, false}
View Source
var Turquoise = Color{0x40, 0xE0, 0xD0, 255, false}
View Source
var Violet = Color{0xEE, 0x82, 0xEE, 255, false}
View Source
var Wheat = Color{0xF5, 0xDE, 0xB3, 255, false}
View Source
var White = Color{0xFF, 0xFF, 0xFF, 255, false}
View Source
var WhiteSmoke = Color{0xF5, 0xF5, 0xF5, 255, false}
View Source
var Yellow = Color{0xFF, 0xFF, 0x00, 255, false}
View Source
var YellowGreen = Color{0x9A, 0xCD, 0x32, 255, 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