Table of Contents

Class ColorPresets

Namespace
LibGFX.Graphics
Assembly
LibGFX.dll

A collection of convenient color presets and helpers. Colors are returned as Vector4 (r,g,b,a) with each component in range [0,1].

public static class ColorPresets
Inheritance
ColorPresets
Inherited Members

Properties

AliceBlue

public static Vector4 AliceBlue { get; }

Property Value

Vector4

AntiqueWhite

public static Vector4 AntiqueWhite { get; }

Property Value

Vector4

Aqua

public static Vector4 Aqua { get; }

Property Value

Vector4

Aquamarine

public static Vector4 Aquamarine { get; }

Property Value

Vector4

Azure

public static Vector4 Azure { get; }

Property Value

Vector4

Beige

public static Vector4 Beige { get; }

Property Value

Vector4

Bisque

public static Vector4 Bisque { get; }

Property Value

Vector4

Black

public static Vector4 Black { get; }

Property Value

Vector4

BlanchedAlmond

public static Vector4 BlanchedAlmond { get; }

Property Value

Vector4

Blue

public static Vector4 Blue { get; }

Property Value

Vector4

BlueViolet

public static Vector4 BlueViolet { get; }

Property Value

Vector4

Brown

public static Vector4 Brown { get; }

Property Value

Vector4

BurlyWood

public static Vector4 BurlyWood { get; }

Property Value

Vector4

CadetBlue

public static Vector4 CadetBlue { get; }

Property Value

Vector4

Chartreuse

public static Vector4 Chartreuse { get; }

Property Value

Vector4

Chocolate

public static Vector4 Chocolate { get; }

Property Value

Vector4

Coral

public static Vector4 Coral { get; }

Property Value

Vector4

CornflowerBlue

public static Vector4 CornflowerBlue { get; }

Property Value

Vector4

Crimson

public static Vector4 Crimson { get; }

Property Value

Vector4

Cyan

public static Vector4 Cyan { get; }

Property Value

Vector4

DarkBlue

public static Vector4 DarkBlue { get; }

Property Value

Vector4

DarkCyan

public static Vector4 DarkCyan { get; }

Property Value

Vector4

DarkGoldenrod

public static Vector4 DarkGoldenrod { get; }

Property Value

Vector4

DarkGray

public static Vector4 DarkGray { get; }

Property Value

Vector4

DarkGreen

public static Vector4 DarkGreen { get; }

Property Value

Vector4

DarkKhaki

public static Vector4 DarkKhaki { get; }

Property Value

Vector4

DarkMagenta

public static Vector4 DarkMagenta { get; }

Property Value

Vector4

DarkOliveGreen

public static Vector4 DarkOliveGreen { get; }

Property Value

Vector4

DarkOrange

public static Vector4 DarkOrange { get; }

Property Value

Vector4

DarkOrchid

public static Vector4 DarkOrchid { get; }

Property Value

Vector4

DarkRed

public static Vector4 DarkRed { get; }

Property Value

Vector4

DarkSalmon

public static Vector4 DarkSalmon { get; }

Property Value

Vector4

DarkSeaGreen

public static Vector4 DarkSeaGreen { get; }

Property Value

Vector4

DarkSlateBlue

public static Vector4 DarkSlateBlue { get; }

Property Value

Vector4

DarkSlateGray

public static Vector4 DarkSlateGray { get; }

Property Value

Vector4

DarkTurquoise

public static Vector4 DarkTurquoise { get; }

Property Value

Vector4

DarkViolet

public static Vector4 DarkViolet { get; }

Property Value

Vector4

DeepPink

public static Vector4 DeepPink { get; }

Property Value

Vector4

DeepSkyBlue

public static Vector4 DeepSkyBlue { get; }

Property Value

Vector4

DimGray

public static Vector4 DimGray { get; }

Property Value

Vector4

DodgerBlue

public static Vector4 DodgerBlue { get; }

Property Value

Vector4

Firebrick

public static Vector4 Firebrick { get; }

Property Value

Vector4

FloralWhite

public static Vector4 FloralWhite { get; }

Property Value

Vector4

ForestGreen

public static Vector4 ForestGreen { get; }

Property Value

Vector4

Fuchsia

public static Vector4 Fuchsia { get; }

Property Value

Vector4

Gainsboro

public static Vector4 Gainsboro { get; }

Property Value

Vector4

GhostWhite

public static Vector4 GhostWhite { get; }

Property Value

Vector4

Gold

public static Vector4 Gold { get; }

Property Value

Vector4

Goldenrod

public static Vector4 Goldenrod { get; }

Property Value

Vector4

Gray

public static Vector4 Gray { get; }

Property Value

Vector4

Green

public static Vector4 Green { get; }

Property Value

Vector4

GreenYellow

public static Vector4 GreenYellow { get; }

Property Value

Vector4

Honeydew

public static Vector4 Honeydew { get; }

Property Value

Vector4

HotPink

public static Vector4 HotPink { get; }

Property Value

Vector4

IndianRed

public static Vector4 IndianRed { get; }

Property Value

Vector4

Indigo

public static Vector4 Indigo { get; }

Property Value

Vector4

Ivory

public static Vector4 Ivory { get; }

Property Value

Vector4

Khaki

public static Vector4 Khaki { get; }

Property Value

Vector4

Lavender

public static Vector4 Lavender { get; }

Property Value

Vector4

LavenderBlush

public static Vector4 LavenderBlush { get; }

Property Value

Vector4

LawnGreen

public static Vector4 LawnGreen { get; }

Property Value

Vector4

LemonChiffon

public static Vector4 LemonChiffon { get; }

Property Value

Vector4

LightBlue

public static Vector4 LightBlue { get; }

Property Value

Vector4

LightCoral

public static Vector4 LightCoral { get; }

Property Value

Vector4

LightCyan

public static Vector4 LightCyan { get; }

Property Value

Vector4

LightGoldenrodYellow

public static Vector4 LightGoldenrodYellow { get; }

Property Value

Vector4

LightGray

public static Vector4 LightGray { get; }

Property Value

Vector4

LightGreen

public static Vector4 LightGreen { get; }

Property Value

Vector4

LightPink

public static Vector4 LightPink { get; }

Property Value

Vector4

LightSalmon

public static Vector4 LightSalmon { get; }

Property Value

Vector4

LightSeaGreen

public static Vector4 LightSeaGreen { get; }

Property Value

Vector4

LightSkyBlue

public static Vector4 LightSkyBlue { get; }

Property Value

Vector4

LightSlateGray

public static Vector4 LightSlateGray { get; }

Property Value

Vector4

LightSteelBlue

public static Vector4 LightSteelBlue { get; }

Property Value

Vector4

Lime

public static Vector4 Lime { get; }

Property Value

Vector4

LimeGreen

public static Vector4 LimeGreen { get; }

Property Value

Vector4

Linen

public static Vector4 Linen { get; }

Property Value

Vector4

Magenta

public static Vector4 Magenta { get; }

Property Value

Vector4

Maroon

public static Vector4 Maroon { get; }

Property Value

Vector4

MediumAquamarine

public static Vector4 MediumAquamarine { get; }

Property Value

Vector4

MediumBlue

public static Vector4 MediumBlue { get; }

Property Value

Vector4

MediumOrchid

public static Vector4 MediumOrchid { get; }

Property Value

Vector4

MediumPurple

public static Vector4 MediumPurple { get; }

Property Value

Vector4

MediumSeaGreen

public static Vector4 MediumSeaGreen { get; }

Property Value

Vector4

MediumSlateBlue

public static Vector4 MediumSlateBlue { get; }

Property Value

Vector4

MediumSpringGreen

public static Vector4 MediumSpringGreen { get; }

Property Value

Vector4

MediumTurquoise

public static Vector4 MediumTurquoise { get; }

Property Value

Vector4

MediumVioletRed

public static Vector4 MediumVioletRed { get; }

Property Value

Vector4

MidnightBlue

public static Vector4 MidnightBlue { get; }

Property Value

Vector4

MintCream

public static Vector4 MintCream { get; }

Property Value

Vector4

MistyRose

public static Vector4 MistyRose { get; }

Property Value

Vector4

Moccasin

public static Vector4 Moccasin { get; }

Property Value

Vector4

NavajoWhite

public static Vector4 NavajoWhite { get; }

Property Value

Vector4

Navy

public static Vector4 Navy { get; }

Property Value

Vector4

OldLace

public static Vector4 OldLace { get; }

Property Value

Vector4

Olive

public static Vector4 Olive { get; }

Property Value

Vector4

OliveDrab

public static Vector4 OliveDrab { get; }

Property Value

Vector4

Orange

public static Vector4 Orange { get; }

Property Value

Vector4

OrangeRed

public static Vector4 OrangeRed { get; }

Property Value

Vector4

Orchid

public static Vector4 Orchid { get; }

Property Value

Vector4

PaleGoldenrod

public static Vector4 PaleGoldenrod { get; }

Property Value

Vector4

PaleGreen

public static Vector4 PaleGreen { get; }

Property Value

Vector4

PaleTurquoise

public static Vector4 PaleTurquoise { get; }

Property Value

Vector4

PaleVioletRed

public static Vector4 PaleVioletRed { get; }

Property Value

Vector4

PapayaWhip

public static Vector4 PapayaWhip { get; }

Property Value

Vector4

PeachPuff

public static Vector4 PeachPuff { get; }

Property Value

Vector4

Peru

public static Vector4 Peru { get; }

Property Value

Vector4

Pink

public static Vector4 Pink { get; }

Property Value

Vector4

Plum

public static Vector4 Plum { get; }

Property Value

Vector4

PowderBlue

public static Vector4 PowderBlue { get; }

Property Value

Vector4

Purple

public static Vector4 Purple { get; }

Property Value

Vector4

Red

public static Vector4 Red { get; }

Property Value

Vector4

RosyBrown

public static Vector4 RosyBrown { get; }

Property Value

Vector4

RoyalBlue

public static Vector4 RoyalBlue { get; }

Property Value

Vector4

SaddleBrown

public static Vector4 SaddleBrown { get; }

Property Value

Vector4

Salmon

public static Vector4 Salmon { get; }

Property Value

Vector4

SandyBrown

public static Vector4 SandyBrown { get; }

Property Value

Vector4

SeaGreen

public static Vector4 SeaGreen { get; }

Property Value

Vector4

Seashell

public static Vector4 Seashell { get; }

Property Value

Vector4

Sienna

public static Vector4 Sienna { get; }

Property Value

Vector4

Silver

public static Vector4 Silver { get; }

Property Value

Vector4

SkyBlue

public static Vector4 SkyBlue { get; }

Property Value

Vector4

SlateBlue

public static Vector4 SlateBlue { get; }

Property Value

Vector4

SlateGray

public static Vector4 SlateGray { get; }

Property Value

Vector4

Snow

public static Vector4 Snow { get; }

Property Value

Vector4

SpringGreen

public static Vector4 SpringGreen { get; }

Property Value

Vector4

SteelBlue

public static Vector4 SteelBlue { get; }

Property Value

Vector4

Tan

public static Vector4 Tan { get; }

Property Value

Vector4

Teal

public static Vector4 Teal { get; }

Property Value

Vector4

Thistle

public static Vector4 Thistle { get; }

Property Value

Vector4

Tomato

public static Vector4 Tomato { get; }

Property Value

Vector4

Turquoise

public static Vector4 Turquoise { get; }

Property Value

Vector4

Violet

public static Vector4 Violet { get; }

Property Value

Vector4

Wheat

public static Vector4 Wheat { get; }

Property Value

Vector4

White

public static Vector4 White { get; }

Property Value

Vector4

WhiteSmoke

public static Vector4 WhiteSmoke { get; }

Property Value

Vector4

Yellow

public static Vector4 Yellow { get; }

Property Value

Vector4

YellowGreen

public static Vector4 YellowGreen { get; }

Property Value

Vector4

Methods

FromHex(string)

Parse a hex string like "#RRGGBB" or "#RRGGBBAA" into a Vector4. Accepts "RRGGBB" or "RRGGBBAA" (with or without leading '#').

public static Vector4 FromHex(string hex)

Parameters

hex string

Returns

Vector4

FromRgb(byte, byte, byte, byte)

Create a Vector4 color from 0-255 RGB values and optional alpha (0..255).

public static Vector4 FromRgb(byte r, byte g, byte b, byte a = 255)

Parameters

r byte
g byte
b byte
a byte

Returns

Vector4

Lerp(Vector4, Vector4, float)

Linearly interpolate between two colors (t in [0,1]).

public static Vector4 Lerp(Vector4 a, Vector4 b, float t)

Parameters

a Vector4
b Vector4
t float

Returns

Vector4

WithAlpha(Vector4, float)

Return a copy of color with modified alpha (0..1).

public static Vector4 WithAlpha(Vector4 color, float alpha)

Parameters

color Vector4
alpha float

Returns

Vector4