docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ColorAlpha

    Linear RGBA color.

    Implements
    IEquatable<ColorAlpha>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Cloud.Gltfast.Objects
    Assembly: Unity.Cloud.Gltfast.dll
    Syntax
    public struct ColorAlpha : IEquatable<ColorAlpha>

    Constructors

    ColorAlpha(float, float, float, float)

    Creates a new ColorAlpha.

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

    Red component.

    float g

    Green component.

    float b

    Blue component.

    float a

    Alpha component. Defaults to 1.

    Properties

    A

    Alpha component.

    Declaration
    public float A { readonly get; set; }
    Property Value
    Type Description
    float

    B

    Blue component.

    Declaration
    public float B { readonly get; set; }
    Property Value
    Type Description
    float

    G

    Green component.

    Declaration
    public float G { readonly get; set; }
    Property Value
    Type Description
    float

    R

    Red component.

    Declaration
    public float R { readonly get; set; }
    Property Value
    Type Description
    float

    White

    Opaque white color (1, 1, 1, 1).

    Declaration
    public static ColorAlpha White { get; }
    Property Value
    Type Description
    ColorAlpha

    Methods

    Equals(object)

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

    Equals(ColorAlpha)

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

    GetHashCode()

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

    Operators

    operator ==(ColorAlpha, ColorAlpha)

    Component-wise equality with floating point tolerance of epsilon.

    Declaration
    public static bool operator ==(ColorAlpha a, ColorAlpha b)
    Parameters
    Type Name Description
    ColorAlpha a

    First color.

    ColorAlpha b

    Second color.

    Returns
    Type Description
    bool

    True if all components match within tolerance.

    implicit operator Color(ColorAlpha)

    Implicit conversion to Color.

    Declaration
    public static implicit operator Color(ColorAlpha c)
    Parameters
    Type Name Description
    ColorAlpha c

    Source color.

    Returns
    Type Description
    Color

    Unity Color.

    implicit operator ColorAlpha(Color)

    Implicit conversion from Color.

    Declaration
    public static implicit operator ColorAlpha(Color c)
    Parameters
    Type Name Description
    Color c

    Source color.

    Returns
    Type Description
    ColorAlpha

    glTF Color.

    operator !=(ColorAlpha, ColorAlpha)

    Component-wise inequality with floating point tolerance of epsilon.

    Declaration
    public static bool operator !=(ColorAlpha a, ColorAlpha b)
    Parameters
    Type Name Description
    ColorAlpha a

    First color.

    ColorAlpha b

    Second color.

    Returns
    Type Description
    bool

    True if any component differs beyond tolerance.

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)