Table of Contents

Class VectorExtensions

Namespace
RichHudFramework
Assembly
RichHudClient.dll
public static class VectorExtensions
Inheritance
VectorExtensions

Methods

GetBbColor(Color)

Converts a color to its normalized linear RGB equivalent. Assumes additive blending with premultiplied alpha.

public static Vector4 GetBbColor(this Color color)

Parameters

color Color

Returns

Vector4

GetChannel(Color, int)

Retrieves the channel of a given Color by its index. R = 0, G = 1, B = 2, A = 3.

public static byte GetChannel(this Color color, int channel)

Parameters

color Color
channel int

Returns

byte

SetAlphaPct(Color, float)

Calculates the alpha of the color based on a float value between 0 and 1 and returns the new color.

public static Color SetAlphaPct(this Color color, float alphaPercent)

Parameters

color Color
alphaPercent float

Returns

Color

SetChannel(Color, int, byte)

Sets the channel of a given Color by its index to the given value. R = 0, G = 1, B = 2, A = 3.

public static Color SetChannel(this Color color, int channel, byte value)

Parameters

color Color
channel int
value byte

Returns

Color

ToDouble(Vector2)

Converts a Vector2 to a Vector2D

public static Vector2D ToDouble(this Vector2 vec)

Parameters

vec Vector2

Returns

Vector2D

ToSingle(Vector2D)

Converts a Vector2D to a Vector2

public static Vector2 ToSingle(this Vector2D vec)

Parameters

vec Vector2D

Returns

Vector2