Find Color Codes

ChatColor enum

Bukkit Color Codes

Bukkit, Spigot and Paper expose Minecraft's 16 color slots as a Java enum called ChatColor. The values are identical to the game's own codes. What changes is how you write them: ChatColor.DARK_RED in plugin code, &4 in a YAML config.

Source Minecraft Wiki, Formatting codes

Bukkit logo, on this reference for its chatcolor enum
The Bukkit logo, shown for identification. It is a trademark of its owner and this site is not affiliated with it.

Plugin (Java)

player.sendMessage(ChatColor.RED + "Hello");

config.yml

prefix: '&c[Server]&r '

Translate at runtime

ChatColor.translateAlternateColorCodes('&', s)

Every code

Bukkit Color Codes: full list

Click any value to copy it. The hex column is what the game actually renders, so you can match it exactly outside the game.

Enum Code Color Hex
ChatColor.BLACK &0 / §0 Black #000000
ChatColor.DARK_BLUE &1 / §1 Dark Blue #0000AA
ChatColor.DARK_GREEN &2 / §2 Dark Green #00AA00
ChatColor.DARK_AQUA &3 / §3 Dark Aqua #00AAAA
ChatColor.DARK_RED &4 / §4 Dark Red #AA0000
ChatColor.DARK_PURPLE &5 / §5 Dark Purple #AA00AA
ChatColor.GOLD &6 / §6 Gold #FFAA00
ChatColor.GRAY &7 / §7 Gray #AAAAAA
ChatColor.DARK_GRAY &8 / §8 Dark Gray #555555
ChatColor.BLUE &9 / §9 Blue #5555FF
ChatColor.GREEN &a / §a Green #55FF55
ChatColor.AQUA &b / §b Aqua #55FFFF
ChatColor.RED &c / §c Red #FF5555
ChatColor.LIGHT_PURPLE &d / §d Light Purple #FF55FF
ChatColor.YELLOW &e / §e Yellow #FFFF55
ChatColor.WHITE &f / §f White #FFFFFF

Worth knowing

ChatColor.translateAlternateColorCodes('&', message) is the call that turns the & form in a config file into the § form the client renders. Getting the two mixed up is the single most common cause of literal &c showing up in chat.