Skip to content

ExtensionsColorNumerics Class

Extensions to convert Vector4 to/from SadRogue.Primitives.Color.

C#
public static class ExtensionsColorNumerics

Inheritance object

Converts a SadRogue.Primitives.Color to a Vector4.

C#
public static Vector4 ToVector4(this Color color)

color SadRogue.Primitives.Color
The color to convert.

Vector4
The Vector4 representing the color.

Converts a SadRogue.Primitives.Color to a Vector3.

C#
public static Vector3 ToVector3(this Color color)

color SadRogue.Primitives.Color
The color to convert.

Vector3
The Vector3 representing the color.

Converts a Vector4 to a SadRogue.Primitives.Color.

C#
public static Color ToColor(this Vector4 value)

value Vector4
The vector color to convert.

SadRogue.Primitives.Color
The SadRogue.Primitives.Color representing the color.

Converts a Vector3 to a SadRogue.Primitives.Color.

C#
public static Color ToColor(this Vector3 value)

value Vector3
The vector color to convert.

SadRogue.Primitives.Color
The SadRogue.Primitives.Color representing the color.

Converts a SadRogue.Primitives.Point to a Vector2.

C#
public static Vector2 ToVector2(this Point point)

point SadRogue.Primitives.Point
The point to convert.

Vector2
The Vector2 representing the point.

Gets a Vector2 representing the UV coordinates of a SadRogue.Primitives.Point within a SadRogue.Primitives.Point size.

C#
public static Vector2 ToUV(this Point point, Point size)

point SadRogue.Primitives.Point
The coordinates within the size.

size SadRogue.Primitives.Point
The size.

Vector2
The UV coordinates.