Class ColorRgb
- Namespace
- idunno.Bluesky.Embed.External.Source
- Assembly
- idunno.Bluesky.dll
Enumerates the RGB color components of a theme color.
[JsonPolymorphic(UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
[JsonDerivedType(typeof(ColorRgb), "app.bsky.embed.external#colorRGB")]
public record ColorRgb : IEquatable<ColorRgb>Inheritance
Implements
Inherited Members
Constructors
ColorRgb(int, int, int)
Create a new idunno.Bluesky.Embed.External.Source.ColorRgb instance.
public ColorRgb(int red, int green, int blue)Parameters
redint-
The red value for the color.
greenint-
The green value for the color.
blueint-
The blue value for the color.
Exceptions
- ArgumentOutOfRangeException
-
Thrown when a color component is out of the valid range (0-255).
ColorRgb(ColorRgb)
protected ColorRgb(ColorRgb original)Parameters
originalColorRgb
ColorRgb(int, int, int)
Create a new idunno.Bluesky.Embed.External.Source.ColorRgb instance.
public ColorRgb(int red, int green, int blue)Parameters
redint-
The red value for the color.
greenint-
The green value for the color.
blueint-
The blue value for the color.
Exceptions
- ArgumentOutOfRangeException
-
Thrown when a color component is out of the valid range (0-255).
ColorRgb(ColorRgb)
protected ColorRgb(ColorRgb original)Parameters
originalColorRgb
ColorRgb(int, int, int)
Create a new idunno.Bluesky.Embed.External.Source.ColorRgb instance.
public ColorRgb(int red, int green, int blue)Parameters
redint-
The red value for the color.
greenint-
The green value for the color.
blueint-
The blue value for the color.
Exceptions
- ArgumentOutOfRangeException
-
Thrown when a color component is out of the valid range (0-255).
ColorRgb(ColorRgb)
protected ColorRgb(ColorRgb original)Parameters
originalColorRgb
Properties
Blue
The blue value of the color.
[JsonPropertyName("b")]
[JsonRequired]
public int Blue { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
Blue
The blue value of the color.
[JsonPropertyName("b")]
[JsonRequired]
public int Blue { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
Blue
The blue value of the color.
[JsonPropertyName("b")]
[JsonRequired]
public int Blue { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
EqualityContract
protected virtual Type EqualityContract { get; }Property Value
EqualityContract
protected virtual Type EqualityContract { get; }Property Value
EqualityContract
protected virtual Type EqualityContract { get; }Property Value
Green
The green value of the color.
[JsonPropertyName("g")]
[JsonRequired]
public int Green { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
Green
The green value of the color.
[JsonPropertyName("g")]
[JsonRequired]
public int Green { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
Green
The green value of the color.
[JsonPropertyName("g")]
[JsonRequired]
public int Green { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
Red
The red value of the color.
[JsonPropertyName("r")]
[JsonRequired]
public int Red { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
Red
The red value of the color.
[JsonPropertyName("r")]
[JsonRequired]
public int Red { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
Red
The red value of the color.
[JsonPropertyName("r")]
[JsonRequired]
public int Red { get; init; }Property Value
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is out of the valid range (0-255).
Methods
<Clone>$()
public virtual ColorRgb <Clone>$()Returns
<Clone>$()
public virtual ColorRgb <Clone>$()Returns
<Clone>$()
public virtual ColorRgb <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(ColorRgb?)
public virtual bool Equals(ColorRgb? other)Parameters
otherColorRgb?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(ColorRgb?)
public virtual bool Equals(ColorRgb? other)Parameters
otherColorRgb?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(ColorRgb?)
public virtual bool Equals(ColorRgb? other)Parameters
otherColorRgb?
Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)Parameters
builderStringBuilder
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)Parameters
builderStringBuilder
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(ColorRgb?, ColorRgb?)
public static bool operator ==(ColorRgb? left, ColorRgb? right)Parameters
Returns
operator ==(ColorRgb?, ColorRgb?)
public static bool operator ==(ColorRgb? left, ColorRgb? right)Parameters
Returns
operator ==(ColorRgb?, ColorRgb?)
public static bool operator ==(ColorRgb? left, ColorRgb? right)Parameters
Returns
operator !=(ColorRgb?, ColorRgb?)
public static bool operator !=(ColorRgb? left, ColorRgb? right)Parameters
Returns
operator !=(ColorRgb?, ColorRgb?)
public static bool operator !=(ColorRgb? left, ColorRgb? right)Parameters
Returns
operator !=(ColorRgb?, ColorRgb?)
public static bool operator !=(ColorRgb? left, ColorRgb? right)