Color Node | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Color Node

    Description

    Defines a constant Vector 4 value in the shader using a Color field. Can be converted to a Color type Property via the Node's context menu. The value of the Mode parameter will also respected when generating the Property.

    Ports

    Name Direction Type Binding Description
    Out Output Vector 4 None Output value

    Controls

    Name Type Options Description
    Color Defines the output value.
    Mode Dropdown Default, HDR Sets properties of the Color field

    Generated Code Example

    The following example code represents one possible outcome of this node.

    float4 _Color = IsGammaSpace() ? float4(1, 2, 3, 4) : float4(SRGBToLinear(float3(1, 2, 3)), 4);
    
    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