docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class OptionalColorConverter

    UXML attribute converter for optional Color values.

    Inheritance
    object
    UxmlAttributeConverter<Optional<Color>>
    OptionalConverter<Color>
    OptionalColorConverter
    Inherited Members
    OptionalConverter<Color>.FromString(string)
    OptionalConverter<Color>.ToString(Optional<Color>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.Editor
    Assembly: Unity.AppUI.Editor.dll
    Syntax
    public class OptionalColorConverter : OptionalConverter<Color>

    Methods

    TryParse(string, out Color)

    Tries to parse the attribute value as an HTML color string.

    Declaration
    protected override bool TryParse(string value, out Color v)
    Parameters
    Type Name Description
    string value

    The string to parse, such as #RRGGBB or a color name.

    Color v

    The parsed color, or the default color if parsing failed.

    Returns
    Type Description
    bool

    True if the value could be parsed, False otherwise.

    Overrides
    OptionalConverter<Color>.TryParse(string, out Color)
    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)