Table of Contents

Struct ColorF

Namespace
MohawkGame2D
Assembly
GAME 10003 Game Development Foundations - 2D Game Template.dll

Represents an RGBA color (128-bit) using 32-bit float color components (numbers from 0.0f to 1.0f).

public struct ColorF
Inherited Members

Constructors

ColorF()

Create a new color. Black.

public ColorF()

ColorF(float)

Create a new grayscale color using the intensity value.

public ColorF(float intensity)

Parameters

intensity float

The intensity (brightness) value (0.0f-1.0f).

ColorF(float, float)

Create a new grayscale color using the intensity value with opacity.

public ColorF(float intensity, float opacity)

Parameters

intensity float

The intensity (brightness) value (0.0f-1.0f).

opacity float

The opacity value, 0f for fully translucid, 1f for fully opaque.

ColorF(float, float, float)

Creates a new RGB color.

public ColorF(float r, float g, float b)

Parameters

r float

Red color channel value (0.0f-1.0f).

g float

Green color channel value (0.0f-1.0f).

b float

Blue color channel value (0.0f-1.0f).

ColorF(float, float, float, float)

Creates a new RGBA color.

public ColorF(float r, float g, float b, float a)

Parameters

r float

Red color channel value (0.0f-1.0f).

g float

Green color channel value (0.0f-1.0f).

b float

Blue color channel value (0.0f-1.0f).

a float

Alpha channel value (0.0f-1.0f).

Properties

A

Alpha colour channel (0.0f-1.0f).

public float A { readonly get; set; }

Property Value

float

B

Blue colour channel (0.0f-1.0f).

public float B { readonly get; set; }

Property Value

float

G

Green colour channel (0.0f-1.0f).

public float G { readonly get; set; }

Property Value

float

R

Red colour channel (0.0f-1.0f).

public float R { readonly get; set; }

Property Value

float

Methods

ToString()

Returns the fully qualified type name of this instance.

public override readonly string ToString()

Returns

string

The fully qualified type name.