Table of Contents

Class ColorExtensions

Namespace
Icy.Rendering
Assembly
IcyUI.dll

Provides extension methods for the colors.

public static class ColorExtensions
Inheritance
ColorExtensions
Inherited Members

Methods

AsColor(Vector4)

Converts four-dimensional normalized vector to its color representation.

public static Color AsColor(this Vector4 vector)

Parameters

vector Vector4

Normalized vector to convert.

Returns

Color

An instance of the Color struct with mapping from vector XYZW to color ARGB (alpha, red, green, blue) and multiplying by 255 each component.

AsVector(Color)

Converts color to the vector representation converting integer color components to normalized float values.

public static Vector4 AsVector(this Color c)

Parameters

c Color

Color to convert.

Returns

Vector4

An instance of the Vector4 struct with mapping from color ARGB (alpha, red, green, blue) to vector XYZW normalized by dividing by 255.