color

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmykColor

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

Represents a CMYK color.

func NewCmykColor

func NewCmykColor(cyan float64, magenta float64, yellow float64, black float64) *CmykColor

Initializes a new instance of the 'CmykColor'

  • @param {float} cyan. The cyan intensity.
  • @param {float} magenta. The magenta intensity.
  • @param {float} yellow. The yellow intensity.
  • @param {float} black. The black intensity.

func (*CmykColor) Black

func (p *CmykColor) Black() *CmykColor

Gets the color black.

func (*CmykColor) ColorString

func (p *CmykColor) ColorString() string

func (*CmykColor) SetColorString

func (p *CmykColor) SetColorString(value string)

func (*CmykColor) White

func (p *CmykColor) White() *CmykColor

Gets the color white.

type Color

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

Base class representing a color.

func NewColor

func NewColor() *Color

func (*Color) ColorString

func (p *Color) ColorString() string

func (*Color) SetColorString

func (p *Color) SetColorString(value string)

type ColorSpaceType

type ColorSpaceType int
const (
	// Represents a Monochrome color space.
	Monochrome ColorSpaceType = 0

	// Represents a Grayscale color space.
	Grayscale ColorSpaceType = 1

	// Represents an RGB color space.
	RGB ColorSpaceType = 2

	// Represents a CMYK color space.
	CMYK ColorSpaceType = 3

	// Represents an Indexed color space.
	Indexed ColorSpaceType = 4

	// Unknown color space.
	Unknown ColorSpaceType = 5
)

type Grayscalecolor

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

Represents a grayscale color.

func NewGrayscalecolor

func NewGrayscalecolor(greyLevel float64) *Grayscalecolor

Initializes a new instance of the 'Grayscale' class.

  • @param {float} grayLevel. The gray level for the color.

func (*Grayscalecolor) Black

func (p *Grayscalecolor) Black() string

Gets the color black.

func (*Grayscalecolor) ColorString

func (p *Grayscalecolor) ColorString() string

func (*Grayscalecolor) GrayLevel

func (p *Grayscalecolor) GrayLevel() float64

func (*Grayscalecolor) SetColorString

func (p *Grayscalecolor) SetColorString(value string)

func (*Grayscalecolor) SetGrayLevel

func (p *Grayscalecolor) SetGrayLevel(grayLevel float64)

func (*Grayscalecolor) White

func (p *Grayscalecolor) White() string

Gets the color white.

type RgbColor

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

Represents an RGB color.

func NewRgbColor

func NewRgbColor(red float32, green float32, blue float32) *RgbColor

Initializes a new instance of the 'RgbColor' class.

  • @param {float} red. The red intensity.
  • @param {float} green. The green intensity.
  • @param {float} blue. The blue intensity.

func NewRgbColorDefault

func NewRgbColorDefault() *RgbColor

func (*RgbColor) AliceBlue

func (p *RgbColor) AliceBlue() RgbColor

Gets the color alice blue.

func (*RgbColor) AntiqueWhite

func (p *RgbColor) AntiqueWhite() RgbColor

Gets the color antique white.

func (*RgbColor) Aqua

func (p *RgbColor) Aqua() RgbColor

Gets the color aqua.

func (*RgbColor) Aquamarine

func (p *RgbColor) Aquamarine() RgbColor

Gets the color aquamarine.

func (*RgbColor) Azure

func (p *RgbColor) Azure() RgbColor

Gets the color azure.

func (*RgbColor) Beige

func (p *RgbColor) Beige() RgbColor

Gets the color beige.

func (*RgbColor) Bisque

func (p *RgbColor) Bisque() RgbColor

Gets the color bisque.

func (*RgbColor) Black

func (p *RgbColor) Black() RgbColor

Gets the color black.

func (*RgbColor) BlanchedAlmond

func (p *RgbColor) BlanchedAlmond() RgbColor

Gets the color blanched almond.

func (*RgbColor) Blue

func (p *RgbColor) Blue() RgbColor

Gets the color blue.

func (*RgbColor) BlueViolet

func (p *RgbColor) BlueViolet() RgbColor

Gets the color blue violet.

func (*RgbColor) Brown

func (p *RgbColor) Brown() RgbColor

Gets the color brown.

func (*RgbColor) BurlyWood

func (p *RgbColor) BurlyWood() RgbColor

Gets the color burly wood.

func (*RgbColor) CadetBlue

func (p *RgbColor) CadetBlue() RgbColor

Gets the color cadet blue.

func (*RgbColor) Chartreuse

func (p *RgbColor) Chartreuse() RgbColor

Gets the color chartreuse.

func (*RgbColor) Chocolate

func (p *RgbColor) Chocolate() RgbColor

Gets the color chocolate.

func (*RgbColor) Coral

func (p *RgbColor) Coral() RgbColor

Gets the color coral.

func (*RgbColor) CornflowerBlue

func (p *RgbColor) CornflowerBlue() RgbColor

Gets the color cornflower blue.

func (*RgbColor) Cornsilk

func (p *RgbColor) Cornsilk() RgbColor

Gets the color cornsilk.

func (*RgbColor) Crimson

func (p *RgbColor) Crimson() RgbColor

Gets the color crimson.

func (*RgbColor) Cyan

func (p *RgbColor) Cyan() RgbColor

Gets the color cyan.

func (*RgbColor) DarkBlue

func (p *RgbColor) DarkBlue() RgbColor

Gets the color dark blue.

func (*RgbColor) DarkCyan

func (p *RgbColor) DarkCyan() RgbColor

Gets the color dark cyan.

func (*RgbColor) DarkGoldenRod

func (p *RgbColor) DarkGoldenRod() RgbColor

Gets the color dark golden rod.

func (*RgbColor) DarkGray

func (p *RgbColor) DarkGray() RgbColor

Gets the color dark gray.

func (*RgbColor) DarkGreen

func (p *RgbColor) DarkGreen() RgbColor

Gets the color dark green.

func (*RgbColor) DarkKhaki

func (p *RgbColor) DarkKhaki() RgbColor

Gets the color dark khaki.

func (*RgbColor) DarkMagenta

func (p *RgbColor) DarkMagenta() RgbColor

Gets the color dark magenta.

func (*RgbColor) DarkOliveGreen

func (p *RgbColor) DarkOliveGreen() RgbColor

Gets the color dark olive green.

func (*RgbColor) DarkOrange

func (p *RgbColor) DarkOrange() RgbColor

Gets the color dark orange.

func (*RgbColor) DarkOrchid

func (p *RgbColor) DarkOrchid() RgbColor

Gets the color dark orchid.

func (*RgbColor) DarkRed

func (p *RgbColor) DarkRed() RgbColor

Gets the color dark red.

func (*RgbColor) DarkSalmon

func (p *RgbColor) DarkSalmon() RgbColor

Gets the color dark salmon.

func (*RgbColor) DarkSeaGreen

func (p *RgbColor) DarkSeaGreen() RgbColor

Gets the color dark sea green.

func (*RgbColor) DarkSlateBlue

func (p *RgbColor) DarkSlateBlue() RgbColor

Gets the color dark slate blue.

func (*RgbColor) DarkSlateGray

func (p *RgbColor) DarkSlateGray() RgbColor

Gets the color dark slate gray.

func (*RgbColor) DarkTurquoise

func (p *RgbColor) DarkTurquoise() RgbColor

Gets the color dark turquoise.

func (*RgbColor) DarkViolet

func (p *RgbColor) DarkViolet() RgbColor

Gets the color dark violet.

func (*RgbColor) DeepPink

func (p *RgbColor) DeepPink() RgbColor

Gets the color deep pink.

func (*RgbColor) DeepSkyBlue

func (p *RgbColor) DeepSkyBlue() RgbColor

Gets the color deep sky blue.

func (*RgbColor) DimGray

func (p *RgbColor) DimGray() RgbColor

Gets the color dim gray.

func (*RgbColor) DodgerBlue

func (p *RgbColor) DodgerBlue() RgbColor

Gets the color dodger blue.

func (*RgbColor) Feldspar

func (p *RgbColor) Feldspar() RgbColor

Gets the color feldspar.

func (*RgbColor) FireBrick

func (p *RgbColor) FireBrick() RgbColor

Gets the color fire brick.

func (*RgbColor) FloralWhite

func (p *RgbColor) FloralWhite() RgbColor

Gets the color floral white.

func (*RgbColor) ForestGreen

func (p *RgbColor) ForestGreen() RgbColor

Gets the color forest green.

func (*RgbColor) Fuchsia

func (p *RgbColor) Fuchsia() RgbColor

Gets the color fuchsia.

func (*RgbColor) Gainsboro

func (p *RgbColor) Gainsboro() RgbColor

Gets the color gainsboro.

func (*RgbColor) GhostWhite

func (p *RgbColor) GhostWhite() RgbColor

Gets the color ghost white.

func (*RgbColor) Gold

func (p *RgbColor) Gold() RgbColor

Gets the color gold.

func (*RgbColor) GoldenRod

func (p *RgbColor) GoldenRod() RgbColor

Gets the color golden rod.

func (*RgbColor) Gray

func (p *RgbColor) Gray() RgbColor

Gets the color gray.

func (*RgbColor) Green

func (p *RgbColor) Green() RgbColor

Gets the color green.

func (*RgbColor) GreenYellow

func (p *RgbColor) GreenYellow() RgbColor

Gets the color green yellow.

func (*RgbColor) HoneyDew

func (p *RgbColor) HoneyDew() RgbColor

Gets the color honey dew.

func (*RgbColor) HotPink

func (p *RgbColor) HotPink() RgbColor

Gets the color hot pink.

func (*RgbColor) IndianRed

func (p *RgbColor) IndianRed() RgbColor

Gets the color indian red.

func (*RgbColor) Indigo

func (p *RgbColor) Indigo() RgbColor

Gets the color indigo.

func (*RgbColor) Ivory

func (p *RgbColor) Ivory() RgbColor

Gets the color ivory.

func (*RgbColor) Khaki

func (p *RgbColor) Khaki() RgbColor

Gets the color khaki.

func (*RgbColor) Lavender

func (p *RgbColor) Lavender() RgbColor

Gets the color lavender.

func (*RgbColor) LavenderBlush

func (p *RgbColor) LavenderBlush() RgbColor

Gets the color lavender blush.

func (*RgbColor) LawnGreen

func (p *RgbColor) LawnGreen() RgbColor

Gets the color lawn Green.

func (*RgbColor) LemonChiffon

func (p *RgbColor) LemonChiffon() RgbColor

Gets the color lemon chiffon.

func (*RgbColor) LightBlue

func (p *RgbColor) LightBlue() RgbColor

Gets the color light blue.

func (*RgbColor) LightCoral

func (p *RgbColor) LightCoral() RgbColor

Gets the color light coral.

func (*RgbColor) LightCyan

func (p *RgbColor) LightCyan() RgbColor

Gets the color light cyan.

func (*RgbColor) LightGoldenRodYellow

func (p *RgbColor) LightGoldenRodYellow() RgbColor

Gets the color light golden rod yellow.

func (*RgbColor) LightGreen

func (p *RgbColor) LightGreen() RgbColor

Gets the color light green.

func (*RgbColor) LightGrey

func (p *RgbColor) LightGrey() RgbColor

Gets the color light grey.

func (*RgbColor) LightPink

func (p *RgbColor) LightPink() RgbColor

Gets the color light pink.

func (*RgbColor) LightSalmon

func (p *RgbColor) LightSalmon() RgbColor

Gets the color light salmon.

func (*RgbColor) LightSeaGreen

func (p *RgbColor) LightSeaGreen() RgbColor

Gets the color light sea green.

func (*RgbColor) LightSkyBlue

func (p *RgbColor) LightSkyBlue() RgbColor

Gets the color light sky blue.

func (*RgbColor) LightSlateBlue

func (p *RgbColor) LightSlateBlue() RgbColor

Gets the color light slate blue.

func (*RgbColor) LightSlateGray

func (p *RgbColor) LightSlateGray() RgbColor

Gets the color light slate gray.

func (*RgbColor) LightSteelBlue

func (p *RgbColor) LightSteelBlue() RgbColor

Gets the color light steel blue.

func (*RgbColor) LightYellow

func (p *RgbColor) LightYellow() RgbColor

Gets the color light yellow.

func (*RgbColor) Lime

func (p *RgbColor) Lime() RgbColor

Gets the color lime.

func (*RgbColor) LimeGreen

func (p *RgbColor) LimeGreen() RgbColor

Gets the color lime green.

func (*RgbColor) Linen

func (p *RgbColor) Linen() RgbColor

Gets the color linen.

func (*RgbColor) Magenta

func (p *RgbColor) Magenta() RgbColor

Gets the color magenta.

func (*RgbColor) Maroon

func (p *RgbColor) Maroon() RgbColor

Gets the color maroon.

func (*RgbColor) MediumAquaMarine

func (p *RgbColor) MediumAquaMarine() RgbColor

Gets the color medium aqua marine.

func (*RgbColor) MediumBlue

func (p *RgbColor) MediumBlue() RgbColor

Gets the color medium blue.

func (*RgbColor) MediumOrchid

func (p *RgbColor) MediumOrchid() RgbColor

Gets the color medium orchid.

func (*RgbColor) MediumPurple

func (p *RgbColor) MediumPurple() RgbColor

Gets the color medium purple.

func (*RgbColor) MediumSeaGreen

func (p *RgbColor) MediumSeaGreen() RgbColor

Gets the color medium sea green.

func (*RgbColor) MediumSlateBlue

func (p *RgbColor) MediumSlateBlue() RgbColor

Gets the color medium slate blue.

func (*RgbColor) MediumSpringGreen

func (p *RgbColor) MediumSpringGreen() RgbColor

Gets the color medium spring green.

func (*RgbColor) MediumTurquoise

func (p *RgbColor) MediumTurquoise() RgbColor

Gets the color medium turquoise.

func (*RgbColor) MediumVioletRed

func (p *RgbColor) MediumVioletRed() RgbColor

Gets the color medium violet red.

func (*RgbColor) MidnightBlue

func (p *RgbColor) MidnightBlue() RgbColor

Gets the color midnight blue.

func (*RgbColor) MintCream

func (p *RgbColor) MintCream() RgbColor

Gets the color mint cream.

func (*RgbColor) MistyRose

func (p *RgbColor) MistyRose() RgbColor

Gets the color misty rose.

func (*RgbColor) Moccasin

func (p *RgbColor) Moccasin() RgbColor

Gets the color moccasin.

func (*RgbColor) NavajoWhite

func (p *RgbColor) NavajoWhite() RgbColor

Gets the color navajo white.

func (*RgbColor) Navy

func (p *RgbColor) Navy() RgbColor

Gets the color navy.

func (*RgbColor) OldLace

func (p *RgbColor) OldLace() RgbColor

Gets the color old lace.

func (*RgbColor) Olive

func (p *RgbColor) Olive() RgbColor

Gets the color olive.

func (*RgbColor) OliveDrab

func (p *RgbColor) OliveDrab() RgbColor

Gets the color olive drab.

func (*RgbColor) Orange

func (p *RgbColor) Orange() RgbColor

Gets the color orange.

func (*RgbColor) OrangeRed

func (p *RgbColor) OrangeRed() RgbColor

Gets the color orange red.

func (*RgbColor) Orchid

func (p *RgbColor) Orchid() RgbColor

Gets the color orchid.

func (*RgbColor) PaleGoldenRod

func (p *RgbColor) PaleGoldenRod() RgbColor

Gets the color pale golden rod.

func (*RgbColor) PaleGreen

func (p *RgbColor) PaleGreen() RgbColor

Gets the color pale green.

func (*RgbColor) PaleTurquoise

func (p *RgbColor) PaleTurquoise() RgbColor

Gets the color pale turquoise.

func (*RgbColor) PaleVioletRed

func (p *RgbColor) PaleVioletRed() RgbColor

Gets the color pale violet red.

func (*RgbColor) PapayaWhip

func (p *RgbColor) PapayaWhip() RgbColor

Gets the color papaya whip.

func (*RgbColor) PeachPuff

func (p *RgbColor) PeachPuff() RgbColor

Gets the color peach puff.

func (*RgbColor) Peru

func (p *RgbColor) Peru() RgbColor

Gets the color peru.

func (*RgbColor) Pink

func (p *RgbColor) Pink() RgbColor

Gets the color pink.

func (*RgbColor) Plum

func (p *RgbColor) Plum() RgbColor

Gets the color plum.

func (*RgbColor) PowderBlue

func (p *RgbColor) PowderBlue() RgbColor

Gets the color powder blue.

func (*RgbColor) Purple

func (p *RgbColor) Purple() RgbColor

Gets the color purple.

func (*RgbColor) Red

func (p *RgbColor) Red() RgbColor

Gets the color red.

func (*RgbColor) RgbColorString

func (p *RgbColor) RgbColorString() string

func (*RgbColor) RosyBrown

func (p *RgbColor) RosyBrown() RgbColor

Gets the color rosy brown.

func (*RgbColor) RoyalBlue

func (p *RgbColor) RoyalBlue() RgbColor

Gets the color royal blue.

func (*RgbColor) SaddleBrown

func (p *RgbColor) SaddleBrown() RgbColor

Gets the color saddle brown.

func (*RgbColor) Salmon

func (p *RgbColor) Salmon() RgbColor

Gets the color salmon.

func (*RgbColor) SandyBrown

func (p *RgbColor) SandyBrown() RgbColor

Gets the color sandy brown.

func (*RgbColor) SeaGreen

func (p *RgbColor) SeaGreen() RgbColor

Gets the color sea green.

func (*RgbColor) SeaShell

func (p *RgbColor) SeaShell() RgbColor

Gets the color sea shell.

func (*RgbColor) Sienna

func (p *RgbColor) Sienna() RgbColor

Gets the color sienna.

func (*RgbColor) Silver

func (p *RgbColor) Silver() RgbColor

Gets the color silver.

func (*RgbColor) SkyBlue

func (p *RgbColor) SkyBlue() RgbColor

Gets the color sky blue.

func (*RgbColor) SlateBlue

func (p *RgbColor) SlateBlue() RgbColor

Gets the color slate blue.

func (*RgbColor) SlateGray

func (p *RgbColor) SlateGray() RgbColor

Gets the color slate gray.

func (*RgbColor) Snow

func (p *RgbColor) Snow() RgbColor

Gets the color snow.

func (*RgbColor) SpringGreen

func (p *RgbColor) SpringGreen() RgbColor

Gets the color spring green.

func (*RgbColor) SteelBlue

func (p *RgbColor) SteelBlue() RgbColor

Gets the color steel blue.

func (*RgbColor) Tan

func (p *RgbColor) Tan() RgbColor

Gets the color Tan.

func (*RgbColor) Teal

func (p *RgbColor) Teal() RgbColor

Gets the color teal.

func (*RgbColor) Thistle

func (p *RgbColor) Thistle() RgbColor

Gets the color thistle.

func (*RgbColor) Tomato

func (p *RgbColor) Tomato() RgbColor

Gets the color tomato.

func (*RgbColor) Turquoise

func (p *RgbColor) Turquoise() RgbColor

Gets the color turquoise.

func (*RgbColor) Violet

func (p *RgbColor) Violet() RgbColor

Gets the color violet.

func (*RgbColor) VioletRed

func (p *RgbColor) VioletRed() RgbColor

Gets the color violet red.

func (*RgbColor) Wheat

func (p *RgbColor) Wheat() RgbColor

Gets the color wheat.

func (*RgbColor) White

func (p *RgbColor) White() RgbColor

Gets the color white.

func (*RgbColor) WhiteSmoke

func (p *RgbColor) WhiteSmoke() RgbColor

Gets the color white smoke.

func (*RgbColor) Yellow

func (p *RgbColor) Yellow() RgbColor

Gets the color yellow.

func (*RgbColor) YellowGreen

func (p *RgbColor) YellowGreen() RgbColor

Gets the color yellow green.

type WebColor

type WebColor struct {
	RgbColor
}

Represents an RGB color created using the web hexadecimal convention.

func NewWebColor

func NewWebColor(color string) *WebColor

Initializes a new instance of the `WebColor` class.

  • @param {string} webHexString. The hexadecimal string representing the color.

Jump to

Keyboard shortcuts

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