Falco Engine 3.9.0.1 (beta)
FalcoEngine.Color Struct Reference

Public Member Functions

 Color (float r, float g, float b, float a)
 
 Color (float r, float g, float b)
 
override string ToString ()
 
string ToString (string format)
 
override bool Equals (object other)
 
bool Equals (Color other)
 
override int GetHashCode ()
 

Static Public Member Functions

static Color operator+ (Color a, Color b)
 
static Color operator- (Color a, Color b)
 
static Color operator* (Color a, Color b)
 
static Color operator* (Color a, float b)
 
static Color operator* (float b, Color a)
 
static Color operator/ (Color a, float b)
 
static bool operator== (Color lhs, Color rhs)
 
static bool operator!= (Color lhs, Color rhs)
 
static implicit operator Vector4 (Color c)
 
static implicit operator Color (Vector4 v)
 
static Color Lerp (Color a, Color b, float t)
 
static Color LerpUnclamped (Color a, Color b, float t)
 
static void RGBToHSV (Color rgbColor, out float H, out float S, out float V)
 
static Color HSVToRGB (float H, float S, float V)
 
static Color HSVToRGB (float H, float S, float V, bool hdr)
 

Public Attributes

float r
 
float g
 
float b
 
float a
 

Properties

static Color red [get]
 
static Color green [get]
 
static Color blue [get]
 
static Color white [get]
 
static Color black [get]
 
static Color yellow [get]
 
static Color cyan [get]
 
static Color magenta [get]
 
static Color gray [get]
 
static Color grey [get]
 
static Color clear [get]
 
static Color aqua [get]
 
static Color cream [get]
 
static Color fuchsia [get]
 
static Color darkGreen [get]
 
static Color maroon [get]
 
static Color darkBlue [get]
 
static Color darkRed [get]
 
static Color olive [get]
 
static Color silver [get]
 
static Color teal [get]
 
float grayscale [get]
 
float this[int index] [getset]
 

Detailed Description

Definition at line 5 of file Color.cs.

Constructor & Destructor Documentation

◆ Color() [1/2]

FalcoEngine.Color.Color ( float  r,
float  g,
float  b,
float  a 
)

Constructs a new Color with given r,g,b,a components.

Parameters
rRed component.
gGreen component.
bBlue component.
aAlpha component.

Definition at line 169 of file Color.cs.

◆ Color() [2/2]

FalcoEngine.Color.Color ( float  r,
float  g,
float  b 
)

Constructs a new Color with given r,g,b components and sets a to 1.

Parameters
rRed component.
gGreen component.
bBlue component.

Definition at line 183 of file Color.cs.

Member Function Documentation

◆ Equals() [1/2]

bool FalcoEngine.Color.Equals ( Color  other)

Definition at line 218 of file Color.cs.

◆ Equals() [2/2]

override bool FalcoEngine.Color.Equals ( object  other)

Definition at line 209 of file Color.cs.

◆ GetHashCode()

override int FalcoEngine.Color.GetHashCode ( )

Definition at line 447 of file Color.cs.

◆ HSVToRGB() [1/2]

static Color FalcoEngine.Color.HSVToRGB ( float  H,
float  S,
float  V 
)
static

Creates an RGB colour from HSV input.

Parameters
HHue [0..1].
SSaturation [0..1].
VBrightness value [0..1].
hdrOutput HDR colours. If true, the returned colour will not be clamped to [0..1].
Returns
An opaque colour with HSV matching the input.

Definition at line 353 of file Color.cs.

◆ HSVToRGB() [2/2]

static Color FalcoEngine.Color.HSVToRGB ( float  H,
float  S,
float  V,
bool  hdr 
)
static

Creates an RGB colour from HSV input.

Parameters
HHue [0..1].
SSaturation [0..1].
VBrightness value [0..1].
hdrOutput HDR colours. If true, the returned colour will not be clamped to [0..1].
Returns
An opaque colour with HSV matching the input.

Definition at line 368 of file Color.cs.

◆ Lerp()

static Color FalcoEngine.Color.Lerp ( Color  a,
Color  b,
float  t 
)
static

Linearly interpolates between colors a and b by t.

Parameters
aColor a.
bColor b.
tFloat for combining a and b.

Definition at line 279 of file Color.cs.

◆ LerpUnclamped()

static Color FalcoEngine.Color.LerpUnclamped ( Color  a,
Color  b,
float  t 
)
static

Linearly interpolates between colors a and b by t.

Parameters
a
b
t

Definition at line 291 of file Color.cs.

◆ operator Color()

static implicit FalcoEngine.Color.operator Color ( Vector4  v)
static

Definition at line 268 of file Color.cs.

◆ operator Vector4()

static implicit FalcoEngine.Color.operator Vector4 ( Color  c)
static

Definition at line 263 of file Color.cs.

◆ operator!=()

static bool FalcoEngine.Color.operator!= ( Color  lhs,
Color  rhs 
)
static

Definition at line 258 of file Color.cs.

◆ operator*() [1/3]

static Color FalcoEngine.Color.operator* ( Color  a,
Color  b 
)
static

Definition at line 233 of file Color.cs.

◆ operator*() [2/3]

static Color FalcoEngine.Color.operator* ( Color  a,
float  b 
)
static

Definition at line 238 of file Color.cs.

◆ operator*() [3/3]

static Color FalcoEngine.Color.operator* ( float  b,
Color  a 
)
static

Definition at line 243 of file Color.cs.

◆ operator+()

static Color FalcoEngine.Color.operator+ ( Color  a,
Color  b 
)
static

Definition at line 223 of file Color.cs.

◆ operator-()

static Color FalcoEngine.Color.operator- ( Color  a,
Color  b 
)
static

Definition at line 228 of file Color.cs.

◆ operator/()

static Color FalcoEngine.Color.operator/ ( Color  a,
float  b 
)
static

Definition at line 248 of file Color.cs.

◆ operator==()

static bool FalcoEngine.Color.operator== ( Color  lhs,
Color  rhs 
)
static

Definition at line 253 of file Color.cs.

◆ RGBToHSV()

static void FalcoEngine.Color.RGBToHSV ( Color  rgbColor,
out float  H,
out float  S,
out float  V 
)
static

Definition at line 296 of file Color.cs.

◆ ToString() [1/2]

override string FalcoEngine.Color.ToString ( )

Returns a nicely formatted string of this color.

Parameters
format

Definition at line 195 of file Color.cs.

◆ ToString() [2/2]

string FalcoEngine.Color.ToString ( string  format)

Returns a nicely formatted string of this color.

Parameters
format

Definition at line 204 of file Color.cs.

Member Data Documentation

◆ a

float FalcoEngine.Color.a

Definition at line 10 of file Color.cs.

◆ b

float FalcoEngine.Color.b

Definition at line 9 of file Color.cs.

◆ g

float FalcoEngine.Color.g

Definition at line 8 of file Color.cs.

◆ r

float FalcoEngine.Color.r

Definition at line 7 of file Color.cs.

Property Documentation

◆ aqua

Color FalcoEngine.Color.aqua
staticget

Aqua

Definition at line 70 of file Color.cs.

◆ black

Color FalcoEngine.Color.black
staticget

Solid black. RGBA is (0, 0, 0, 1).

Definition at line 35 of file Color.cs.

◆ blue

Color FalcoEngine.Color.blue
staticget

Solid blue. RGBA is (0, 0, 1, 1).

Definition at line 25 of file Color.cs.

◆ clear

Color FalcoEngine.Color.clear
staticget

Completely transparent. RGBA is (0, 0, 0, 0).

Definition at line 65 of file Color.cs.

◆ cream

Color FalcoEngine.Color.cream
staticget

Cream

Definition at line 75 of file Color.cs.

◆ cyan

Color FalcoEngine.Color.cyan
staticget

Cyan. RGBA is (0, 1, 1, 1).

Definition at line 45 of file Color.cs.

◆ darkBlue

Color FalcoEngine.Color.darkBlue
staticget

Dark blue

Definition at line 95 of file Color.cs.

◆ darkGreen

Color FalcoEngine.Color.darkGreen
staticget

Dark green

Definition at line 85 of file Color.cs.

◆ darkRed

Color FalcoEngine.Color.darkRed
staticget

Dark red

Definition at line 100 of file Color.cs.

◆ fuchsia

Color FalcoEngine.Color.fuchsia
staticget

Fuchsia

Definition at line 80 of file Color.cs.

◆ gray

Color FalcoEngine.Color.gray
staticget

Gray. RGBA is (0.5, 0.5, 0.5, 1).

Definition at line 55 of file Color.cs.

◆ grayscale

float FalcoEngine.Color.grayscale
get

The grayscale value of the color. (Read Only)

Definition at line 120 of file Color.cs.

◆ green

Color FalcoEngine.Color.green
staticget

Solid green. RGBA is (0, 1, 0, 1).

Definition at line 20 of file Color.cs.

◆ grey

Color FalcoEngine.Color.grey
staticget

English spelling for gray. RGBA is the same (0.5, 0.5, 0.5, 1).

Definition at line 60 of file Color.cs.

◆ magenta

Color FalcoEngine.Color.magenta
staticget

Magenta. RGBA is (1, 0, 1, 1).

Definition at line 50 of file Color.cs.

◆ maroon

Color FalcoEngine.Color.maroon
staticget

Maroon

Definition at line 90 of file Color.cs.

◆ olive

Color FalcoEngine.Color.olive
staticget

Olive

Definition at line 105 of file Color.cs.

◆ red

Color FalcoEngine.Color.red
staticget

Solid red. RGBA is (1, 0, 0, 1).

Definition at line 15 of file Color.cs.

◆ silver

Color FalcoEngine.Color.silver
staticget

Silver

Definition at line 110 of file Color.cs.

◆ teal

Color FalcoEngine.Color.teal
staticget

Teal

Definition at line 115 of file Color.cs.

◆ this[int index]

float FalcoEngine.Color.this[int index]
getset

Definition at line 122 of file Color.cs.

◆ white

Color FalcoEngine.Color.white
staticget

Solid white. RGBA is (1, 1, 1, 1).

Definition at line 30 of file Color.cs.

◆ yellow

Color FalcoEngine.Color.yellow
staticget

Yellow. RGBA is (1, 0.92, 0.016, 1), but the color is nice to look at!

Definition at line 40 of file Color.cs.


The documentation for this struct was generated from the following file: