-
Notifications
You must be signed in to change notification settings - Fork 0
webmaster442.windowsterminal.color
Namespace: Webmaster442.WindowsTerminal
Represents a color in RGB format.
public struct ColorInheritance Object → ValueType → Color
Implements IParsable<Color>, IEquatable<Color>
Attributes IsReadOnlyAttribute
Gets the Red component.
public byte R { get; }Gets the Green component.
public byte G { get; }Gets the Blue component.
public byte B { get; }Initializes a new instance of the Color struct with the specified RGB values.
Color(byte r, byte g, byte b)r Byte
The red component.
g Byte
The green component.
b Byte
The blue component.
Parse a color from a string representation.
Color Parse(string s, IFormatProvider provider)s String
string representation. Supported formats are: Supported are: rgb(r, g, b), ##rrggbb and hsl(h, s%, l%)
provider IFormatProvider
format provider
Color
A color in RGB space
FormatException
Invalid format was specified
Try to Parse a color from a string representation.
bool TryParse(string s, IFormatProvider provider, Color& result)s String
string representation. Supported formats are: Supported are: rgb(r, g, b), ##rrggbb and hsl(h, s%, l%)
provider IFormatProvider
format provider
result Color&
A color in RGB space
Boolean
true, if parsing was successfull, otherwise false
Create a color from its HSL representation.
Color FromHsl(double hue, double saturation, double light)hue Double
Color Hue
saturation Double
Color saturation
light Double
Color light
Color
A color in RGB space
string ToString()int GetHashCode()bool Equals(object obj)obj Object
bool Equals(Color other)other Color