Search Results for

    Show / Hide Table of Contents

    Struct GammaColor

    Represents a 32-bit color in Gamma space.

    Implements
    IEquatable<GammaColor>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Evergine.Common.Graphics
    Assembly: Evergine.Common.dll
    Syntax
    public struct GammaColor : IEquatable<GammaColor>

    Constructors

    GammaColor(ref Color)

    Initializes a new instance of the GammaColor struct.

    Declaration
    public GammaColor(ref Color color)
    Parameters
    Type Name Description
    Color color

    The Color instance in sRGB space.

    GammaColor(Vector3)

    Initializes a new instance of the GammaColor struct.

    Declaration
    public GammaColor(Vector3 vector)
    Parameters
    Type Name Description
    Vector3 vector

    Vector3 with the color data.

    GammaColor(Vector4)

    Initializes a new instance of the GammaColor struct.

    Declaration
    public GammaColor(Vector4 vector)
    Parameters
    Type Name Description
    Vector4 vector

    Vector4 with the color data.

    GammaColor(float, float, float, float)

    Initializes a new instance of the GammaColor struct.

    Declaration
    public GammaColor(float r, float g, float b, float a = 1)
    Parameters
    Type Name Description
    float r

    The r color component in linear space.

    float g

    The g color component in linear space.

    float b

    The b color component in linear space.

    float a

    The a color component in linear space.

    Fields

    A

    The w coordinate of this GammaColor.

    Declaration
    public float A
    Field Value
    Type Description
    float

    AsVector3

    The linear color converted to Vector3.

    Declaration
    public Vector3 AsVector3
    Field Value
    Type Description
    Vector3

    AsVector4

    The linear color converted to Vector4.

    Declaration
    public Vector4 AsVector4
    Field Value
    Type Description
    Vector4

    B

    The z coordinate of this GammaColor.

    Declaration
    public float B
    Field Value
    Type Description
    float

    G

    The y coordinate of this GammaColor.

    Declaration
    public float G
    Field Value
    Type Description
    float

    R

    The x coordinate of this GammaColor.

    Declaration
    public float R
    Field Value
    Type Description
    float

    Methods

    Equals(GammaColor)

    Declaration
    public bool Equals(GammaColor other)
    Parameters
    Type Name Description
    GammaColor other
    Returns
    Type Description
    bool

    Equals(ref GammaColor)

    Indicates whether this instance and a specified GammaColor are equal.

    Declaration
    public bool Equals(ref GammaColor other)
    Parameters
    Type Name Description
    GammaColor other

    The vector to compare with the current instance.

    Returns
    Type Description
    bool

    true if other and this instance are the same type and represent the same value; otherwise, false.

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    ToLinear(out LinearColor)

    Convert to Linear color space.

    Declaration
    public void ToLinear(out LinearColor linearColor)
    Parameters
    Type Name Description
    LinearColor linearColor

    The converted linear color.

    ToSRGB(out GammaColor)

    Convert to sRGB color space.

    Declaration
    public void ToSRGB(out GammaColor sRGBColor)
    Parameters
    Type Name Description
    GammaColor sRGBColor

    The converted sRGB color.

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Implements

    IEquatable<T>

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In This Article
    Back to top
    Generated by DocFX