Struct LinearRgb
Represents an linear Rgb color with specified RgbWorkingSpace working space
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct LinearRgb : IEquatable<LinearRgb>
Constructors
| Improve this Doc View SourceLinearRgb(Vector3)
Initializes a new instance of the LinearRgb struct.
Declaration
public LinearRgb(Vector3 vector)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | vector | The vector representing the r, g, b components. |
LinearRgb(Vector3, RgbWorkingSpace)
Initializes a new instance of the LinearRgb struct.
Declaration
public LinearRgb(Vector3 vector, RgbWorkingSpace workingSpace)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | vector | The vector representing the r, g, b components. |
| RgbWorkingSpace | workingSpace | The LinearRgb working space. |
LinearRgb(Single, Single, Single)
Initializes a new instance of the LinearRgb struct.
Declaration
public LinearRgb(float r, float g, float b)
Parameters
| Type | Name | Description |
|---|---|---|
| Single | r | The red component ranging between 0 and 1. |
| Single | g | The green component ranging between 0 and 1. |
| Single | b | The blue component ranging between 0 and 1. |
LinearRgb(Single, Single, Single, RgbWorkingSpace)
Initializes a new instance of the LinearRgb struct.
Declaration
public LinearRgb(float r, float g, float b, RgbWorkingSpace workingSpace)
Parameters
| Type | Name | Description |
|---|---|---|
| Single | r | The red component ranging between 0 and 1. |
| Single | g | The green component ranging between 0 and 1. |
| Single | b | The blue component ranging between 0 and 1. |
| RgbWorkingSpace | workingSpace | The rgb working space. |
Fields
| Improve this Doc View SourceB
Gets the blue component.
Declaration
public readonly float B
Field Value
| Type | Description |
|---|---|
| Single |
DefaultWorkingSpace
The default LinearRgb working space.
Declaration
public static readonly RgbWorkingSpace DefaultWorkingSpace
Field Value
| Type | Description |
|---|---|
| RgbWorkingSpace |
G
Gets the green component.
Declaration
public readonly float G
Field Value
| Type | Description |
|---|---|
| Single |
R
Gets the red component.
Declaration
public readonly float R
Field Value
| Type | Description |
|---|---|
| Single |
WorkingSpace
Gets the LinearRgb color space RgbWorkingSpaces
Declaration
public readonly RgbWorkingSpace WorkingSpace
Field Value
| Type | Description |
|---|---|
| RgbWorkingSpace |
Methods
| Improve this Doc View SourceEquals(LinearRgb)
Declaration
public readonly bool Equals(LinearRgb other)
Parameters
| Type | Name | Description |
|---|---|---|
| LinearRgb | other |
Returns
| Type | Description |
|---|---|
| Boolean |
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj |
Returns
| Type | Description |
|---|---|
| Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override readonly string ToString()
Returns
| Type | Description |
|---|---|
| String |
Overrides
| Improve this Doc View SourceToVector3()
Returns a new Vector3 representing this instance.
Declaration
public readonly Vector3 ToVector3()
Returns
| Type | Description |
|---|---|
| Vector3 | The Vector3. |
Operators
| Improve this Doc View SourceEquality(LinearRgb, LinearRgb)
Compares two LinearRgb objects for equality.
Declaration
public static bool operator ==(LinearRgb left, LinearRgb right)
Parameters
| Type | Name | Description |
|---|---|---|
| LinearRgb | left | The LinearRgb on the left side of the operand. |
| LinearRgb | right | The LinearRgb on the right side of the operand. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the current left is equal to the |
Inequality(LinearRgb, LinearRgb)
Compares two LinearRgb objects for inequality.
Declaration
public static bool operator !=(LinearRgb left, LinearRgb right)
Parameters
| Type | Name | Description |
|---|---|---|
| LinearRgb | left | The LinearRgb on the left side of the operand. |
| LinearRgb | right | The LinearRgb on the right side of the operand. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the current left is unequal to the |