Struct uiColor | UIWidgets | 1.5.4-preview.12
docs.unity3d.com
    Show / Hide Table of Contents

    Struct uiColor

    Namespace: Unity.UIWidgets.ui
    Syntax
    public struct uiColor

    Constructors

    uiColor(Int64)

    Declaration
    public uiColor(long value)
    Parameters
    Type Name Description
    Int64 value

    Fields

    black

    Declaration
    public static readonly uiColor black
    Field Value
    Type Description
    uiColor

    clear

    Declaration
    public static readonly uiColor clear
    Field Value
    Type Description
    uiColor

    value

    Declaration
    public readonly long value
    Field Value
    Type Description
    Int64

    white

    Declaration
    public static readonly uiColor white
    Field Value
    Type Description
    uiColor

    Properties

    alpha

    Declaration
    public int alpha { get; }
    Property Value
    Type Description
    Int32

    blue

    Declaration
    public int blue { get; }
    Property Value
    Type Description
    Int32

    green

    Declaration
    public int green { get; }
    Property Value
    Type Description
    Int32

    opacity

    Declaration
    public float opacity { get; }
    Property Value
    Type Description
    Single

    red

    Declaration
    public int red { get; }
    Property Value
    Type Description
    Int32

    Methods

    computeLuminance()

    Declaration
    public float computeLuminance()
    Returns
    Type Description
    Single

    fromARGB(Int32, Int32, Int32, Int32)

    Declaration
    public static uiColor fromARGB(int a, int r, int g, int b)
    Parameters
    Type Name Description
    Int32 a
    Int32 r
    Int32 g
    Int32 b
    Returns
    Type Description
    uiColor

    fromColor(Color)

    Declaration
    public static uiColor fromColor(Color color)
    Parameters
    Type Name Description
    Color color
    Returns
    Type Description
    uiColor

    fromRGBO(Int32, Int32, Int32, Single)

    Declaration
    public static uiColor fromRGBO(int r, int g, int b, float opacity)
    Parameters
    Type Name Description
    Int32 r
    Int32 g
    Int32 b
    Single opacity
    Returns
    Type Description
    uiColor

    withAlpha(Int32)

    Declaration
    public uiColor withAlpha(int a)
    Parameters
    Type Name Description
    Int32 a
    Returns
    Type Description
    uiColor

    withOpacity(Single)

    Declaration
    public uiColor withOpacity(float opacity)
    Parameters
    Type Name Description
    Single opacity
    Returns
    Type Description
    uiColor
    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