ColorRgba

Summary

Represents an 8-bit per channel 32-bit RGBA colour value.

Definition

Namespace: SDT4.Managed.Core.Math
Assembly: SDT4.Managed.Core.dll

struct ColorRgba
Implements:

ISerializable, IEquatable<ColorRgba>

Fields

Name Type Description
public r Byte The red colour channel (0 to 255).
public g Byte The green colour channel (0 to 255).
public b Byte The blue colour channel (0 to 255).
public a Byte The alpha opacity channel (0 to 255, where 255 is fully opaque).
public static readonly Lavender ColorRgba Gets the preset colour Lavender (R: 230, G: 230, B: 250, A: 255).
public static readonly Thistle ColorRgba Gets the preset colour Thistle (R: 216, G: 191, B: 216, A: 255).
public static readonly Plum ColorRgba Gets the preset colour Plum (R: 221, G: 160, B: 221, A: 255).
public static readonly Violet ColorRgba Gets the preset colour Violet (R: 238, G: 130, B: 238, A: 255).
public static readonly Orchid ColorRgba Gets the preset colour Orchid (R: 218, G: 112, B: 214, A: 255).
public static readonly Fuchsia ColorRgba Gets the preset colour Fuchsia (R: 255, G: 0, B: 255, A: 255).
public static readonly Magenta ColorRgba Gets the preset colour Magenta (R: 255, G: 0, B: 255, A: 255).
public static readonly MediumOrchid ColorRgba Gets the preset colour Medium Orchid (R: 186, G: 85, B: 211, A: 255).
public static readonly MediumPurple ColorRgba Gets the preset colour Medium Purple (R: 147, G: 112, B: 219, A: 255).
public static readonly BlueViolet ColorRgba Gets the preset colour Blue Violet (R: 138, G: 43, B: 226, A: 255).
public static readonly DarkViolet ColorRgba Gets the preset colour Dark Violet (R: 148, G: 0, B: 211, A: 255).
public static readonly DarkOrchid ColorRgba Gets the preset colour Dark Orchid (R: 153, G: 50, B: 204, A: 255).
public static readonly DarkMagenta ColorRgba Gets the preset colour Dark Magenta (R: 139, G: 0, B: 139, A: 255).
public static readonly Purple ColorRgba Gets the preset colour Purple (R: 128, G: 0, B: 128, A: 255).
public static readonly Indigo ColorRgba Gets the preset colour Indigo (R: 75, G: 0, B: 130, A: 255).
public static readonly DarkSlateBlue ColorRgba Gets the preset colour Dark Slate Blue (R: 72, G: 61, B: 139, A: 255).
public static readonly SlateBlue ColorRgba Gets the preset colour Slate Blue (R: 106, G: 90, B: 205, A: 255).
public static readonly MediumSlateBlue ColorRgba Gets the preset colour Medium Slate Blue (R: 123, G: 104, B: 238, A: 255).
public static readonly Pink ColorRgba Gets the preset colour Pink (R: 255, G: 192, B: 203, A: 255).
public static readonly LightPink ColorRgba Gets the preset colour Light Pink (R: 255, G: 182, B: 193, A: 255).
public static readonly HotPink ColorRgba Gets the preset colour Hot Pink (R: 255, G: 105, B: 180, A: 255).
public static readonly DeepPink ColorRgba Gets the preset colour Deep Pink (R: 255, G: 20, B: 147, A: 255).
public static readonly PaleVioletRed ColorRgba Gets the preset colour Pale Violet Red (R: 219, G: 112, B: 147, A: 255).
public static readonly MediumVioletRed ColorRgba Gets the preset colour Medium Violet Red (R: 199, G: 21, B: 133, A: 255).
public static readonly LightSalmon ColorRgba Gets the preset colour Light Salmon (R: 255, G: 160, B: 122, A: 255).
public static readonly Salmon ColorRgba Gets the preset colour Salmon (R: 250, G: 128, B: 114, A: 255).
public static readonly DarkSalmon ColorRgba Gets the preset colour Dark Salmon (R: 233, G: 150, B: 122, A: 255).
public static readonly LightCoral ColorRgba Gets the preset colour Light Coral (R: 240, G: 128, B: 128, A: 255).
public static readonly IndianRed ColorRgba Gets the preset colour Indian Red (R: 205, G: 92, B: 92, A: 255).
public static readonly Crimson ColorRgba Gets the preset colour Crimson (R: 220, G: 20, B: 60, A: 255).
public static readonly FireBrick ColorRgba Gets the preset colour Fire Brick (R: 178, G: 34, B: 34, A: 255).
public static readonly DarkRed ColorRgba Gets the preset colour Dark Red (R: 139, G: 0, B: 0, A: 255).
public static readonly Red ColorRgba Gets the preset colour Red (R: 255, G: 0, B: 0, A: 255).
public static readonly OrangeRed ColorRgba Gets the preset colour Orange Red (R: 255, G: 69, B: 0, A: 255).
public static readonly Tomato ColorRgba Gets the preset colour Tomato (R: 255, G: 99, B: 71, A: 255).
public static readonly Coral ColorRgba Gets the preset colour Coral (R: 255, G: 127, B: 80, A: 255).
public static readonly DarkOrange ColorRgba Gets the preset colour Dark Orange (R: 255, G: 140, B: 0, A: 255).
public static readonly Orange ColorRgba Gets the preset colour Orange (R: 255, G: 165, B: 0, A: 255).
public static readonly Yellow ColorRgba Gets the preset colour Yellow (R: 255, G: 255, B: 0, A: 255).
public static readonly LightYellow ColorRgba Gets the preset colour Light Yellow (R: 255, G: 255, B: 224, A: 255).
public static readonly LemonChiffon ColorRgba Gets the preset colour Lemon Chiffon (R: 255, G: 250, B: 205, A: 255).
public static readonly LightGoldenrodYellow ColorRgba Gets the preset colour Light Goldenrod Yellow (R: 250, G: 250, B: 210, A: 255).
public static readonly PapayaWhip ColorRgba Gets the preset colour Papaya Whip (R: 255, G: 239, B: 213, A: 255).
public static readonly Moccasin ColorRgba Gets the preset colour Moccasin (R: 255, G: 228, B: 181, A: 255).
public static readonly PeachPuff ColorRgba Gets the preset colour Peach Puff (R: 255, G: 218, B: 185, A: 255).
public static readonly PaleGoldenrod ColorRgba Gets the preset colour Pale Goldenrod (R: 238, G: 232, B: 170, A: 255).
public static readonly Khaki ColorRgba Gets the preset colour Khaki (R: 240, G: 230, B: 140, A: 255).
public static readonly DarkKhaki ColorRgba Gets the preset colour Dark Khaki (R: 189, G: 183, B: 107, A: 255).
public static readonly Gold ColorRgba Gets the preset colour Gold (R: 255, G: 215, B: 0, A: 255).
public static readonly Cornsilk ColorRgba Gets the preset colour Cornsilk (R: 255, G: 248, B: 220, A: 255).
public static readonly BlanchedAlmond ColorRgba Gets the preset colour Blanched Almond (R: 255, G: 235, B: 205, A: 255).
public static readonly Bisque ColorRgba Gets the preset colour Bisque (R: 255, G: 228, B: 196, A: 255).
public static readonly NavajoWhite ColorRgba Gets the preset colour Navajo White (R: 255, G: 222, B: 173, A: 255).
public static readonly Wheat ColorRgba Gets the preset colour Wheat (R: 245, G: 222, B: 179, A: 255).
public static readonly BurlyWood ColorRgba Gets the preset colour Burly Wood (R: 222, G: 184, B: 135, A: 255).
public static readonly Tan ColorRgba Gets the preset colour Tan (R: 210, G: 180, B: 140, A: 255).
public static readonly RosyBrown ColorRgba Gets the preset colour Rosy Brown (R: 188, G: 143, B: 143, A: 255).
public static readonly SandyBrown ColorRgba Gets the preset colour Sandy Brown (R: 244, G: 164, B: 96, A: 255).
public static readonly Goldenrod ColorRgba Gets the preset colour Goldenrod (R: 218, G: 165, B: 32, A: 255).
public static readonly DarkGoldenrod ColorRgba Gets the preset colour Dark Goldenrod (R: 184, G: 134, B: 11, A: 255).
public static readonly Peru ColorRgba Gets the preset colour Peru (R: 205, G: 133, B: 63, A: 255).
public static readonly Chocolate ColorRgba Gets the preset colour Chocolate (R: 210, G: 105, B: 30, A: 255).
public static readonly SaddleBrown ColorRgba Gets the preset colour Saddle Brown (R: 139, G: 69, B: 19, A: 255).
public static readonly Sienna ColorRgba Gets the preset colour Sienna (R: 160, G: 82, B: 45, A: 255).
public static readonly Brown ColorRgba Gets the preset colour Brown (R: 165, G: 42, B: 42, A: 255).
public static readonly Maroon ColorRgba Gets the preset colour Maroon (R: 128, G: 0, B: 0, A: 255).
public static readonly DarkOliveGreen ColorRgba Gets the preset colour Dark Olive Green (R: 85, G: 107, B: 47, A: 255).
public static readonly Olive ColorRgba Gets the preset colour Olive (R: 128, G: 128, B: 0, A: 255).
public static readonly OliveDrab ColorRgba Gets the preset colour Olive Drab (R: 107, G: 142, B: 35, A: 255).
public static readonly YellowGreen ColorRgba Gets the preset colour Yellow Green (R: 154, G: 205, B: 50, A: 255).
public static readonly LimeGreen ColorRgba Gets the preset colour Lime Green (R: 50, G: 205, B: 50, A: 255).
public static readonly Lime ColorRgba Gets the preset colour Lime (R: 0, G: 255, B: 0, A: 255).
public static readonly LawnGreen ColorRgba Gets the preset colour Lawn Green (R: 124, G: 252, B: 0, A: 255).
public static readonly Chartreuse ColorRgba Gets the preset colour Chartreuse (R: 127, G: 255, B: 0, A: 255).
public static readonly GreenYellow ColorRgba Gets the preset colour Green Yellow (R: 173, G: 255, B: 47, A: 255).
public static readonly SpringGreen ColorRgba Gets the preset colour Spring Green (R: 0, G: 255, B: 127, A: 255).
public static readonly MediumSpringGreen ColorRgba Gets the preset colour Medium Spring Green (R: 0, G: 250, B: 154, A: 255).
public static readonly LightGreen ColorRgba Gets the preset colour Light Green (R: 144, G: 238, B: 144, A: 255).
public static readonly PaleGreen ColorRgba Gets the preset colour Pale Green (R: 152, G: 251, B: 152, A: 255).
public static readonly DarkSeaGreen ColorRgba Gets the preset colour Dark Sea Green (R: 143, G: 188, B: 143, A: 255).
public static readonly MediumSeaGreen ColorRgba Gets the preset colour Medium Sea Green (R: 60, G: 179, B: 113, A: 255).
public static readonly SeaGreen ColorRgba Gets the preset colour Sea Green (R: 46, G: 139, B: 87, A: 255).
public static readonly ForestGreen ColorRgba Gets the preset colour Forest Green (R: 34, G: 139, B: 34, A: 255).
public static readonly Green ColorRgba Gets the preset colour Green (R: 0, G: 128, B: 0, A: 255).
public static readonly DarkGreen ColorRgba Gets the preset colour Dark Green (R: 0, G: 100, B: 0, A: 255).
public static readonly MediumAquamarine ColorRgba Gets the preset colour Medium Aquamarine (R: 102, G: 205, B: 170, A: 255).
public static readonly Aqua ColorRgba Gets the preset colour Aqua (R: 0, G: 255, B: 255, A: 255).
public static readonly Cyan ColorRgba Gets the preset colour Cyan (R: 0, G: 255, B: 255, A: 255).
public static readonly LightCyan ColorRgba Gets the preset colour Light Cyan (R: 224, G: 255, B: 255, A: 255).
public static readonly PaleTurquoise ColorRgba Gets the preset colour Pale Turquoise (R: 175, G: 238, B: 238, A: 255).
public static readonly Aquamarine ColorRgba Gets the preset colour Aquamarine (R: 127, G: 255, B: 212, A: 255).
public static readonly Turquoise ColorRgba Gets the preset colour Turquoise (R: 64, G: 224, B: 208, A: 255).
public static readonly MediumTurquoise ColorRgba Gets the preset colour Medium Turquoise (R: 72, G: 209, B: 204, A: 255).
public static readonly DarkTurquoise ColorRgba Gets the preset colour Dark Turquoise (R: 0, G: 206, B: 209, A: 255).
public static readonly LightSeaGreen ColorRgba Gets the preset colour Light Sea Green (R: 32, G: 178, B: 170, A: 255).
public static readonly CadetBlue ColorRgba Gets the preset colour Cadet Blue (R: 95, G: 158, B: 160, A: 255).
public static readonly DarkCyan ColorRgba Gets the preset colour Dark Cyan (R: 0, G: 139, B: 139, A: 255).
public static readonly Teal ColorRgba Gets the preset colour Teal (R: 0, G: 128, B: 128, A: 255).
public static readonly LightSteelBlue ColorRgba Gets the preset colour Light Steel Blue (R: 176, G: 196, B: 222, A: 255).
public static readonly PowderBlue ColorRgba Gets the preset colour Powder Blue (R: 176, G: 224, B: 230, A: 255).
public static readonly LightBlue ColorRgba Gets the preset colour Light Blue (R: 173, G: 216, B: 230, A: 255).
public static readonly SkyBlue ColorRgba Gets the preset colour Sky Blue (R: 135, G: 206, B: 235, A: 255).
public static readonly LightSkyBlue ColorRgba Gets the preset colour Light Sky Blue (R: 135, G: 206, B: 250, A: 255).
public static readonly DeepSkyBlue ColorRgba Gets the preset colour Deep Sky Blue (R: 0, G: 191, B: 255, A: 255).
public static readonly DodgerBlue ColorRgba Gets the preset colour Dodger Blue (R: 30, G: 144, B: 255, A: 255).
public static readonly CornflowerBlue ColorRgba Gets the preset colour Cornflower Blue (R: 100, G: 149, B: 237, A: 255).
public static readonly SteelBlue ColorRgba Gets the preset colour Steel Blue (R: 70, G: 130, B: 180, A: 255).
public static readonly RoyalBlue ColorRgba Gets the preset colour Royal Blue (R: 65, G: 105, B: 225, A: 255).
public static readonly Blue ColorRgba Gets the preset colour Blue (R: 0, G: 0, B: 255, A: 255).
public static readonly MediumBlue ColorRgba Gets the preset colour Medium Blue (R: 0, G: 0, B: 205, A: 255).
public static readonly DarkBlue ColorRgba Gets the preset colour Dark Blue (R: 0, G: 0, B: 139, A: 255).
public static readonly Navy ColorRgba Gets the preset colour Navy (R: 0, G: 0, B: 128, A: 255).
public static readonly MidnightBlue ColorRgba Gets the preset colour Midnight Blue (R: 25, G: 25, B: 112, A: 255).
public static readonly White ColorRgba Gets the preset colour White (R: 255, G: 255, B: 255, A: 255).
public static readonly Snow ColorRgba Gets the preset colour Snow (R: 255, G: 250, B: 250, A: 255).
public static readonly Honeydew ColorRgba Gets the preset colour Honeydew (R: 240, G: 255, B: 240, A: 255).
public static readonly MintCream ColorRgba Gets the preset colour Mint Cream (R: 245, G: 255, B: 250, A: 255).
public static readonly Azure ColorRgba Gets the preset colour Azure (R: 240, G: 255, B: 255, A: 255).
public static readonly AliceBlue ColorRgba Gets the preset colour Alice Blue (R: 240, G: 248, B: 255, A: 255).
public static readonly GhostWhite ColorRgba Gets the preset colour Ghost White (R: 248, G: 248, B: 255, A: 255).
public static readonly WhiteSmoke ColorRgba Gets the preset colour White Smoke (R: 245, G: 255, B: 245, A: 255).
public static readonly Seashell ColorRgba Gets the preset colour Seashell (R: 255, G: 245, B: 238, A: 255).
public static readonly Beige ColorRgba Gets the preset colour Beige (R: 245, G: 245, B: 220, A: 255).
public static readonly OldLace ColorRgba Gets the preset colour Old Lace (R: 253, G: 245, B: 230, A: 255).
public static readonly FloralWhite ColorRgba Gets the preset colour Floral White (R: 255, G: 250, B: 240, A: 255).
public static readonly Ivory ColorRgba Gets the preset colour Ivory (R: 255, G: 255, B: 240, A: 255).
public static readonly AntiqueWhite ColorRgba Gets the preset colour Antique White (R: 250, G: 235, B: 215, A: 255).
public static readonly Linen ColorRgba Gets the preset colour Linen (R: 250, G: 240, B: 230, A: 255).
public static readonly LavenderBlush ColorRgba Gets the preset colour Lavender Blush (R: 255, G: 240, B: 245, A: 255).
public static readonly MistyRose ColorRgba Gets the preset colour Misty Rose (R: 255, G: 228, B: 225, A: 255).
public static readonly Gainsboro ColorRgba Gets the preset colour Gainsboro (R: 220, G: 220, B: 220, A: 255).
public static readonly LightGray ColorRgba Gets the preset colour Light Gray (R: 211, G: 211, B: 211, A: 255).
public static readonly Silver ColorRgba Gets the preset colour Silver (R: 192, G: 192, B: 192, A: 255).
public static readonly DarkGray ColorRgba Gets the preset colour Dark Gray (R: 169, G: 169, B: 169, A: 255).
public static readonly Gray ColorRgba Gets the preset colour Gray (R: 128, G: 128, B: 128, A: 255).
public static readonly DimGray ColorRgba Gets the preset colour Dim Gray (R: 105, G: 105, B: 105, A: 255).
public static readonly LightSlateGray ColorRgba Gets the preset colour Light Slate Gray (R: 119, G: 136, B: 153, A: 255).
public static readonly SlateGray ColorRgba Gets the preset colour Slate Gray (R: 112, G: 128, B: 144, A: 255).
public static readonly DarkSlateGray ColorRgba Gets the preset colour Dark Slate Gray (R: 47, G: 79, B: 79, A: 255).
public static readonly Black ColorRgba Gets the preset colour Black (R: 0, G: 0, B: 0, A: 255).

Properties

Name Type Description

Methods

public Int32 ToHexInt()

Summary: Packs this colour into a 32-bit signed integer in RGBA order (0xRRGGBBAA).

Returns:


public static Int32 ToHexInt(ColorRgba color)

Summary: Packs a specified colour into a 32-bit signed integer in RGBA order (0xRRGGBBAA).

Parameters:

Returns:


public static ColorRgba FromHexInt(Int32 rgba)

Summary: Unpacks a 32-bit signed integer in RGBA format (0xRRGGBBAA) into a ColorRgba.

Parameters:

Returns:


public UInt32 ToHexUInt()

Summary: Packs this colour into a 32-bit unsigned integer in RGBA order (0xRRGGBBAA).

Returns:


public static Int32 ToHexUInt(ColorRgba color)

Summary: Packs a specified colour into a 32-bit unsigned integer in RGBA order (0xRRGGBBAA).

Parameters:

Returns:


public static ColorRgba FromHexUInt(UInt32 rgba)

Summary: Unpacks a 32-bit unsigned integer in RGBA format (0xRRGGBBAA) into a ColorRgba.

Parameters:

Returns:


public Vector4f ToVector4f()

Summary: Converts this colour to a 4D floating-point vector with components normalised to the range [0.0, 1.0].

Returns:


public static Vector4f ToVector4f(ColorRgba color)

Summary: Converts the specified colour to a 4D floating-point vector with components normalised to the range [0.0, 1.0].

Parameters:

Returns:


public static ColorRgba FromVector4f(Vector4f vector)

Summary: Converts a normalised 4D floating-point vector into a ColorRgba.

Parameters:

Returns:


public static Boolean TryParseCssColor(String? css, out ColorRgba color)

Summary: Attempts to parse a colour from a CSS colour specification string (hex, named web colour, rgb(), or hsl()).

Parameters:

Returns:


public virtual String ToString()

Summary: Returns a hexadecimal string representation of the colour in #rrggbbaa format.

Returns:


public virtual Boolean Equals(Object? obj)

Summary: Determines whether the specified object is a ColorRgba and matches this instance.

Parameters:

Returns:


public Boolean Equals(ColorRgba other)

Summary: Determines whether all RGBA channels of another colour match this instance.

Parameters:

Returns:


public virtual Int32 GetHashCode()

Summary: Returns the hash code for this colour.

Returns:


public Void GetObjectData(SerializationInfo info, StreamingContext context)

Summary: Populates serialisation information with colour channel data.

Parameters: