Table of Contents

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

red int

The red value for the color.

green int

The green value for the color.

blue int

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

original ColorRgb

ColorRgb(int, int, int)

Create a new idunno.Bluesky.Embed.External.Source.ColorRgb instance.

public ColorRgb(int red, int green, int blue)

Parameters

red int

The red value for the color.

green int

The green value for the color.

blue int

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

original ColorRgb

ColorRgb(int, int, int)

Create a new idunno.Bluesky.Embed.External.Source.ColorRgb instance.

public ColorRgb(int red, int green, int blue)

Parameters

red int

The red value for the color.

green int

The green value for the color.

blue int

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

original ColorRgb

Properties

Blue

The blue value of the color.

[JsonPropertyName("b")]
[JsonRequired]
public int Blue { get; init; }

Property Value

int

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

int

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

int

Exceptions

ArgumentOutOfRangeException

Thrown when the value is out of the valid range (0-255).

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Green

The green value of the color.

[JsonPropertyName("g")]
[JsonRequired]
public int Green { get; init; }

Property Value

int

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

int

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

int

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

int

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

int

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

int

Exceptions

ArgumentOutOfRangeException

Thrown when the value is out of the valid range (0-255).

Methods

<Clone>$()

public virtual ColorRgb <Clone>$()

Returns

ColorRgb

<Clone>$()

public virtual ColorRgb <Clone>$()

Returns

ColorRgb

<Clone>$()

public virtual ColorRgb <Clone>$()

Returns

ColorRgb

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(ColorRgb?)

public virtual bool Equals(ColorRgb? other)

Parameters

other ColorRgb?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(ColorRgb?)

public virtual bool Equals(ColorRgb? other)

Parameters

other ColorRgb?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(ColorRgb?)

public virtual bool Equals(ColorRgb? other)

Parameters

other ColorRgb?

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ColorRgb?, ColorRgb?)

public static bool operator ==(ColorRgb? left, ColorRgb? right)

Parameters

left ColorRgb?
right ColorRgb?

Returns

bool

operator ==(ColorRgb?, ColorRgb?)

public static bool operator ==(ColorRgb? left, ColorRgb? right)

Parameters

left ColorRgb?
right ColorRgb?

Returns

bool

operator ==(ColorRgb?, ColorRgb?)

public static bool operator ==(ColorRgb? left, ColorRgb? right)

Parameters

left ColorRgb?
right ColorRgb?

Returns

bool

operator !=(ColorRgb?, ColorRgb?)

public static bool operator !=(ColorRgb? left, ColorRgb? right)

Parameters

left ColorRgb?
right ColorRgb?

Returns

bool

operator !=(ColorRgb?, ColorRgb?)

public static bool operator !=(ColorRgb? left, ColorRgb? right)

Parameters

left ColorRgb?
right ColorRgb?

Returns

bool

operator !=(ColorRgb?, ColorRgb?)

public static bool operator !=(ColorRgb? left, ColorRgb? right)

Parameters

left ColorRgb?
right ColorRgb?

Returns

bool