Skip to content

Chat Colors & UI GUI Text Color

Lawrence G edited this page May 24, 2016 · 2 revisions

###Chat Colors for clientMessage() Use ChatColor.(color name)

If you cannot see the section sign (§) on this page, your font does not support the section sign.

Color Name (ChatColor.*) Section Symbol Usage
BLACK §0
DARK_BLUE §1
DARK_GREEN §2
DARK_AQUA §3
DARK_RED §4
DARK_PURPLE §5
GOLD §6
GRAY §7
DARK_GRAY §8
BLUE §9
GREEN §a
AQUA §b
RED §c
LIGHT_PURPLE §d
YELLOW §e
WHITE §f

An example from 500ise_colourchat.js:

clientMessage(ChatColor.YELLOW + "It's the " + ChatColor.RED + "Red " + ChatColor.GREEN + "Green " + ChatColor.YELLOW + "show!");

###Text Colors for .setTextColor() or .setBackgroundColor() (Java bridge) Use android.graphics.Color.(color name)

Color list from android.graphics.Color:

An example by PocketEdition-Miner:

var text = new android.widget.TextView(ctx);
text.setText("Welcome to partyland!");
text.setTextSize(50);
text.setTextColor(android.graphics.Color.GREEN);

android.graphics.Color.parseColor(string) by BeATz-UnKNoWN

var info = new android.widget.TextView(ctx);
info.setText("This is a GitHub page");
info.setTextSize(24);
info.setTextColor(android.graphics.Color.parseColor("#00CC00")); //Green

The colors that are to be used with parseColor are hex values. Make sure that they are in a RRGGBB format. Here is a link where you can find the hex value of colors: