Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
GUI
1/5
`TextColorButtons` extends the Unity `Button` to handle an additional set of colors that get applied to the text label (depending on the button state).
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
2019.4.0f1
Compatible
Compatible
Compatible
Description

The default Unity buttons allow to specify colors that are applied to the target graphics depending on the button state.

Most buttons have text labels, and sometimes you also want to change the text color depending on the button state (or change only the text color and keep the background graphics unaltered).


This is what `TextColorButtons` allows you to do, by extending the Unity `Button` class to handle an additional set of colors for the text label.


Optional dependency: TextMeshPro

Supported integrations: BinaryCharm.SemanticColorPalette

Technical details

This asset installs as a set of packages you can handle with the Unity Package Manager.


Warning: if you are updating from version 1.0.x, you must you must delete the previous version from `Assets\BinaryCharm` before importing!


The provided scripts extend the default Unity buttons ergonomically.

The fade logic is replicated from the Unity implementation, so the text color fading behaviour should match the target graphics fading behaviour.


All the core logic is in the `ATextColorButton` generic abstract class, and the two derived classes `TextColorButton` and `TMP_TextColorButton` implement the

`setTextColor()`/`getTextColor()` methods for, respectively, buttons having a `UnityEngine.UI.Text` label or a `TMPro.TMP_Text` label.


`Text Color Buttons` optionally integrates with `Semantic Color Palette`, another product

we published on the asset store. This integration mainly consists of `Colorers` for `Text Color Buttons` components:

  • `TextColorButtonColorer`, for `TextColorButton`
  • `TMP_TextColorButtonColorer`, for `TMP_TextColorButton`

Related keywords

Text Color Buttons

(3)
43 users have favourite this asset
(43)
FREE
License type
File size
865.3 KB
Latest version
1.1.1
Latest release date
Oct 22, 2024
Original Unity version
2019.4.0
Support
Visit site
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR