PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

TextColor3

TextButton

Color3

This property determines the color of all the text rendered by a TextButton|GUI element. This property along with TextButton/Font, TextButton/TextSize and TextButton/TextTransparency will determine the visual properties of text. Text is rendered after the text stroke (TextButton/TextStrokeColor3).

It’s important that text is easily read by players! Be sure to choose colors with little-to-no saturation, like white, grey, or black. Make sure the color of your text is contrasted by the TextButton/BackgroundColor3 of the UI element. If the element has a transparent background, try applying a black TextButton/TextStrokeColor3 to help contrast the text with the 3D world behind it.


Code Samples


Vowel Detector

This code sample, when placed within a TextBox, will turn the text color red if the typed string contains no vowels (A, E, I, O or U).


TextBox Secret Word

This code sample creates a password-like interface for a TextBox, giving visual feedback on the player’s input.


Countdown Text

This code sample makes a TextLabel or TextButton count backwards from 10, setting the text color as it does so.


Game State Text

This code sample mirrors the contents of a StringValue into a TextLabel, updating and setting the color of the text as it changes.