docs.unity3d.com
    Show / Hide Table of Contents

    Struct ColorEntry

    A struct representing a color entry in a gradient.

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.AppUI.Core
    Syntax
    public readonly struct ColorEntry : IComparable, IEquatable<ColorEntry>

    Constructors

    ColorEntry(Color, Single)

    Creates a new ColorEntry.

    Declaration
    public ColorEntry(Color color, float position)
    Parameters
    Type Name Description
    Color color

    The color of the entry.

    Single position

    The position of the entry in the gradient.

    Fields

    color

    The color of the entry.

    Declaration
    public readonly Color color
    Field Value
    Type Description
    Color

    position

    The position of the entry in the gradient.

    Declaration
    public readonly float position
    Field Value
    Type Description
    Single

    Methods

    CompareTo(Object)

    Compares this ColorEntry to another object.

    Declaration
    public readonly int CompareTo(object other)
    Parameters
    Type Name Description
    Object other

    The other object to compare to.

    Returns
    Type Description
    Int32

    1 if the other object is not a ColorEntry, otherwise the result of comparing the position of the two ColorEntries.

    Implements
    IComparable.CompareTo(Object)

    Equals(Object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to compare with the current object.

    Returns
    Type Description
    Boolean

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    ValueType.Equals(Object)

    Equals(ColorEntry)

    Determines whether the specified object is equal to the current object.

    Declaration
    public readonly bool Equals(ColorEntry other)
    Parameters
    Type Name Description
    ColorEntry other

    The object to compare with the current object.

    Returns
    Type Description
    Boolean

    true if the specified object is equal to the current object; otherwise, false.

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for the current object.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Returns a string representation of the ColorEntry.

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    String

    A string representation of the ColorEntry.

    Overrides
    ValueType.ToString()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023