docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Text Color

    Important

    This package is deprecated. From Unity 2023.2, TextMesh Pro is part of the Unity UI (uGUI) package. For current documentation, refer to TextMesh Pro in the Unity UI package.

    There are two ways to change text color with color tags:

    • Use named colors, as in <color="colorName">

      The following color names are supported: black, blue, green, orange, purple, red, white, and yellow.

    • Use hexadecimal values, as in <color=#FFFFFF> or <color=#FFFFFFFF> if you also want to define the alpha value.

    If you apply successive <color> tags in the same text, the last one takes precedence over the others until you either add another <color>tage or use a closing </color> tag to end the current color's scope.

    Example:

    <color="red">Red <color=#005500>Dark Green <#0000FF>Blue <color=#FF000088>Semitransparent Red
    


    Successive color tags

    <color="red">Red, <color="blue">Blue,</color> and red again.
    


    Closing color tag

    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)