color

package
v0.0.0-...-c131409 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package color provides color convention and useful functions

Package color provides color convention and useful functions

Package color provides color convention and useful functions

Index

Constants

This section is empty.

Variables

View Source
var Aliceblue = NewFromHEX(0xf0f8ff)
View Source
var Antiquewhite = NewFromHEX(0xfaebd7)
View Source
var Aqua = NewFromHEX(0x00ffff)
View Source
var Aquamarine = NewFromHEX(0x7fffd4)
View Source
var Azure = NewFromHEX(0xf0ffff)
View Source
var Beige = NewFromHEX(0xf5f5dc)
View Source
var Bisque = NewFromHEX(0xffe4c4)
View Source
var Black = NewFromHEX(0x000000)
View Source
var Blanchedalmond = NewFromHEX(0xffebcd)
View Source
var Blue = NewFromHEX(0x0000ff)
View Source
var Blueviolet = NewFromHEX(0x8a2be2)
View Source
var Brown = NewFromHEX(0xa52a2a)
View Source
var Burlywood = NewFromHEX(0xdeb887)
View Source
var Cadetblue = NewFromHEX(0x5f9ea0)
View Source
var Chartreuse = NewFromHEX(0x7fff00)
View Source
var Chocolate = NewFromHEX(0xd2691e)
View Source
var Coral = NewFromHEX(0xff7f50)
View Source
var Cornflowerblue = NewFromHEX(0x6495ed)
View Source
var Cornsilk = NewFromHEX(0xfff8dc)
View Source
var Crimson = NewFromHEX(0xdc143c)
View Source
var Cyan = NewFromHEX(0x00ffff)
View Source
var Darkblue = NewFromHEX(0x00008b)
View Source
var Darkcyan = NewFromHEX(0x008b8b)
View Source
var Darkgoldenrod = NewFromHEX(0xb8860b)
View Source
var Darkgray = NewFromHEX(0xa9a9a9)
View Source
var Darkgreen = NewFromHEX(0x006400)
View Source
var Darkkhaki = NewFromHEX(0xbdb76b)
View Source
var Darkmagenta = NewFromHEX(0x8b008b)
View Source
var Darkolivegreen = NewFromHEX(0x556b2f)
View Source
var Darkorange = NewFromHEX(0xff8c00)
View Source
var Darkorchid = NewFromHEX(0x9932cc)
View Source
var Darkred = NewFromHEX(0x8b0000)
View Source
var Darksalmon = NewFromHEX(0xe9967a)
View Source
var Darkseagreen = NewFromHEX(0x8fbc8f)
View Source
var Darkslateblue = NewFromHEX(0x483d8b)
View Source
var Darkslategray = NewFromHEX(0x2f4f4f)
View Source
var Darkturquoise = NewFromHEX(0x00ced1)
View Source
var Darkviolet = NewFromHEX(0x9400d3)
View Source
var Deeppink = NewFromHEX(0xff1493)
View Source
var Deepskyblue = NewFromHEX(0x00bfff)
View Source
var Dimgray = NewFromHEX(0x696969)
View Source
var Dodgerblue = NewFromHEX(0x1e90ff)
View Source
var Firebrick = NewFromHEX(0xb22222)
View Source
var Floralwhite = NewFromHEX(0xfffaf0)
View Source
var Forestgreen = NewFromHEX(0x228b22)
View Source
var Fuchsia = NewFromHEX(0xff00ff)
View Source
var Gainsboro = NewFromHEX(0xdcdcdc)
View Source
var Ghostwhite = NewFromHEX(0xf8f8ff)
View Source
var Gold = NewFromHEX(0xffd700)
View Source
var Goldenrod = NewFromHEX(0xdaa520)
View Source
var Gray = NewFromHEX(0x808080)
View Source
var Green = NewFromHEX(0x008000)
View Source
var Greenyellow = NewFromHEX(0xadff2f)
View Source
var Honeydew = NewFromHEX(0xf0fff0)
View Source
var Hotpink = NewFromHEX(0xff69b4)
View Source
var Indianred = NewFromHEX(0xcd5c5c)
View Source
var Indigo = NewFromHEX(0x4b0082)
View Source
var Ivory = NewFromHEX(0xfffff0)
View Source
var Khaki = NewFromHEX(0xf0e68c)
View Source
var Lavender = NewFromHEX(0xe6e6fa)
View Source
var Lavenderblush = NewFromHEX(0xfff0f5)
View Source
var Lawngreen = NewFromHEX(0x7cfc00)
View Source
var Lemonchiffon = NewFromHEX(0xfffacd)
View Source
var Lightblue = NewFromHEX(0xadd8e6)
View Source
var Lightcoral = NewFromHEX(0xf08080)
View Source
var Lightcyan = NewFromHEX(0xe0ffff)
View Source
var Lightgoldenrodyellow = NewFromHEX(0xfafad2)
View Source
var Lightgray = NewFromHEX(0xd3d3d3)
View Source
var Lightgreen = NewFromHEX(0x90ee90)
View Source
var Lightpink = NewFromHEX(0xffb6c1)
View Source
var Lightsalmon = NewFromHEX(0xffa07a)
View Source
var Lightseagreen = NewFromHEX(0x20b2aa)
View Source
var Lightskyblue = NewFromHEX(0x87cefa)
View Source
var Lightslategray = NewFromHEX(0x778899)
View Source
var Lightsteelblue = NewFromHEX(0xb0c4de)
View Source
var Lightyellow = NewFromHEX(0xffffe0)
View Source
var Lime = NewFromHEX(0x00ff00)
View Source
var LimegreAliceblueen = NewFromHEX(0x32cd32)
View Source
var Linen = NewFromHEX(0xfaf0e6)
View Source
var Magenta = NewFromHEX(0xff00ff)
View Source
var Maroon = NewFromHEX(0x800000)
View Source
var Mediumaquamarine = NewFromHEX(0x66cdaa)
View Source
var Mediumblue = NewFromHEX(0x0000cd)
View Source
var Mediumorchid = NewFromHEX(0xba55d3)
View Source
var Mediumpurple = NewFromHEX(0x9370d8)
View Source
var Mediumseagreen = NewFromHEX(0x3cb371)
View Source
var Mediumslateblue = NewFromHEX(0x7b68ee)
View Source
var Mediumspringgreen = NewFromHEX(0x00fa9a)
View Source
var Mediumturquoise = NewFromHEX(0x48d1cc)
View Source
var Mediumvioletred = NewFromHEX(0xc71585)
View Source
var Midnightblue = NewFromHEX(0x191970)
View Source
var Mintcream = NewFromHEX(0xf5fffa)
View Source
var Mistyrose = NewFromHEX(0xffe4e1)
View Source
var Moccasin = NewFromHEX(0xffe4b5)
View Source
var Navajowhite = NewFromHEX(0xffdead)
View Source
var Navy = NewFromHEX(0x000080)
View Source
var Oldlace = NewFromHEX(0xfdf5e6)
View Source
var Olive = NewFromHEX(0x808000)
View Source
var Olivedrab = NewFromHEX(0x6b8e23)
View Source
var Orange = NewFromHEX(0xffa500)
View Source
var Orangered = NewFromHEX(0xff4500)
View Source
var Orchid = NewFromHEX(0xda70d6)
View Source
var Palegoldenrod = NewFromHEX(0xeee8aa)
View Source
var Palegreen = NewFromHEX(0x98fb98)
View Source
var Paleturquoise = NewFromHEX(0xafeeee)
View Source
var Palevioletred = NewFromHEX(0xd87093)
View Source
var Papayawhip = NewFromHEX(0xffefd5)
View Source
var Peachpuff = NewFromHEX(0xffdab9)
View Source
var Peru = NewFromHEX(0xcd853f)
View Source
var Pink = NewFromHEX(0xffc0cb)
View Source
var Plum = NewFromHEX(0xdda0dd)
View Source
var Powderblue = NewFromHEX(0xb0e0e6)
View Source
var Purple = NewFromHEX(0x800080)
View Source
var Red = NewFromHEX(0xff0000)
View Source
var Rosybrown = NewFromHEX(0xbc8f8f)
View Source
var Royalblue = NewFromHEX(0x4169e1)
View Source
var Saddlebrown = NewFromHEX(0x8b4513)
View Source
var Salmon = NewFromHEX(0xfa8072)
View Source
var Sandybrown = NewFromHEX(0xf4a460)
View Source
var Seagreen = NewFromHEX(0x2e8b57)
View Source
var Seashell = NewFromHEX(0xfff5ee)
View Source
var Sienna = NewFromHEX(0xa0522d)
View Source
var Silver = NewFromHEX(0xc0c0c0)
View Source
var Skyblue = NewFromHEX(0x87ceeb)
View Source
var Slateblue = NewFromHEX(0x6a5acd)
View Source
var Slategray = NewFromHEX(0x708090)
View Source
var Snow = NewFromHEX(0xfffafa)
View Source
var Springgreen = NewFromHEX(0x00ff7f)
View Source
var Steelblue = NewFromHEX(0x4682b4)
View Source
var Tan = NewFromHEX(0xd2b48c)
View Source
var Teal = NewFromHEX(0x008080)
View Source
var Thistle = NewFromHEX(0xd8bfd8)
View Source
var Tomato = NewFromHEX(0xff6347)
View Source
var Turquoise = NewFromHEX(0x40e0d0)
View Source
var Violet = NewFromHEX(0xee82ee)
View Source
var Wheat = NewFromHEX(0xf5deb3)
View Source
var White = NewFromHEX(0xffffff)
View Source
var Whitesmoke = NewFromHEX(0xf5f5f5)
View Source
var Yellow = NewFromHEX(0xffff00)
View Source
var Yellowgreen = NewFromHEX(0x9acd32)

Functions

func ClampRGB1

func ClampRGB1(r, g, b float64) (float64, float64, float64)

func Equal

func Equal(c, c2 *Color) bool

func HTMLRange

func HTMLRange(n int, colors ...string) (colorsOutput []string)

func RGoldenHue

func RGoldenHue() int

func RHue

func RHue() int

Types

type Color

type Color struct {
	R, G, B, A uint8
}

func DistinguishableColor

func DistinguishableColor(n, s, v int) (colors []*Color)

func Gradient

func Gradient(n int, clrs []*Color, f interpolate.Interp) []*Color

func NewFromHCL

func NewFromHCL(h int, c, l float64) *Color

func NewFromHEX

func NewFromHEX(x uint32) *Color

func NewFromHSB

func NewFromHSB(h, s, b int) *Color

NewHSB

func NewFromHSL

func NewFromHSL(h, s, l int) *Color

NewHSL

func NewFromHSV

func NewFromHSV(h, s, b int) *Color

func NewFromHTML

func NewFromHTML(hexc string) *Color

NewFromHEX

func NewFromHTMLAlpha

func NewFromHTMLAlpha(hexc string, a uint8) *Color

NewFromHEXAlpha

func NewFromLAB

func NewFromLAB(l, a, b float64) *Color

func NewFromRGB

func NewFromRGB(r, g, b uint8) *Color

NewRGB

func NewFromRGB1

func NewFromRGB1(r, g, b float64) *Color

NewRGB1

func NewFromRGBA

func NewFromRGBA(r, g, b, a uint8) *Color

NewRGBA

func NewFromSSA

func NewFromSSA(ssac string) *Color

NewFromHEXAlpha

func NewFromXYZ

func NewFromXYZ(x, y, z float64) *Color

func Rainbow

func Rainbow(n, s, v int, f interpolate.Interp) (colors []*Color)

func RandomColorHSV

func RandomColorHSV(s, v int, f rnd) *Color

RandomColorHSV

func (Color) Analog

func (c Color) Analog(n int, separation int) (colors []*Color)

func (Color) BlendRGB

func (c Color) BlendRGB(c2 *Color, t float64) *Color

BlendRGB return a new color, interpolated between this color and other by an amount specified by t, ranges from 0 (entirely this color) to 1.0 (entirely other.)

func (Color) Complementary

func (c Color) Complementary() *Color

func (Color) Darker

func (c Color) Darker(amt int) *Color

Darker return a darker version of this color

func (*Color) Gradient

func (c *Color) Gradient(n int, c2 *Color, f interpolate.Interp) []*Color

func (Color) Grayscale

func (c Color) Grayscale() *Color

Grayscale desaturate the color

func (Color) HCL

func (c1 Color) HCL() (h int, c, l float64)

func (Color) HEX

func (c Color) HEX() uint32

func (Color) HSB

func (c Color) HSB() (h, s, b int)

func (Color) HSL

func (c Color) HSL() (h, s, l int)

func (Color) HSV

func (c Color) HSV() (h, s, b int)

func (Color) HTML

func (c Color) HTML() string

func (Color) Hue

func (c Color) Hue() int

func (Color) Invert

func (c Color) Invert() *Color

func (Color) LAB

func (c Color) LAB() (l, a, b float64)

func (Color) Lighter

func (c Color) Lighter(amt int) *Color

Lighter return a lighter version of this color

func (*Color) MaxRGB1

func (c *Color) MaxRGB1() (max float64)

func (*Color) MinMaxRGB1

func (c *Color) MinMaxRGB1() (min, max float64)

func (*Color) MinRGB1

func (c *Color) MinRGB1() (min float64)

func (Color) MixRGB

func (c Color) MixRGB(c2 *Color) *Color

func (Color) RGB

func (c Color) RGB() (uint8, uint8, uint8)

func (Color) RGB1

func (c Color) RGB1() (float64, float64, float64)

func (Color) RGBA

func (c Color) RGBA() (uint8, uint8, uint8, uint8)

func (Color) SSA

func (c Color) SSA() string

func (Color) SSAL

func (c Color) SSAL() string

func (Color) String

func (c Color) String() string

func (Color) XYZ

func (c Color) XYZ() (x, y, z float64)

Jump to

Keyboard shortcuts

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