Web Developmentreference12 min read

Chat and Game Color Codes: Discord, Minecraft, and Roblox

Minecraft § codes, Roblox BrickColor and rich text, and what Discord actually supports—embeds yes, arbitrary message color no.

Your community manager pasted hex colors into Discord messages and wondered why nothing changed. Your Minecraft plugin author used &c in a config file and got literal ampersands in chat. Your Roblox UI scripter set TextColor3 on a label, then enabled RichText with font color tags, and fought precedence bugs for an afternoon. Three platforms, three different color systems, and only one of them gives ordinary players a cheat-sheet palette they can type into public chat without writing code.

Chat and game platforms inherit color from terminal traditions, limited palette enums, and security sandboxes that block user-controlled HTML. Confusing them produces broken MOTDs, unreadable Roblox HUD copy, and Discord bots marketed as custom colored messages when only embeds carry accent bars—not the prose users type in channel bodies. This reference maps what each platform supports, the exact syntax, hex equivalents where they exist, and what you cannot do without a bot, mod, or developer script.

The most expensive mistake is assuming one mental model travels. Discord is not Minecraft with a webhook. Roblox RichText is not Discord markdown. Minecraft JSON hex is not the same as legacy section-sign codes in survival typing. Match the platform’s actual API and color stops being folklore.

Minecraft: section-sign formatting codes

Minecraft Java Edition styles in-game text with formatting codes introduced by the section sign character § (U+00A7). In chat, books, signs on Java, anvil names, and server MOTD, the code consumes one following character and applies color or style to all subsequent text until reset. Bukkit, Spigot, Paper, and Bedrock-adjacent tooling often accept & as a config-file alias for § because the section sign is awkward in YAML and properties files. The server translates &c to §c at runtime. Writing & directly in vanilla Minecraft chat does not work unless a plugin performs substitution.

Minecraft uses a fixed sixteen-color palette in legacy chat, not arbitrary hex in survival typing. Codes after § are case-sensitive for hex digits a through f; format codes use lowercase letters as shown in official tables. Format codes stack until reset: obfuscated §k, bold §l, strikethrough §m, underline §n, italic §o, reset §r. Bold plus italic is valid; order follows Minecraft’s internal renderer.

Code Color name Hex (approx.)
§0 Black #000000
§1 Dark Blue #0000AA
§2 Dark Green #00AA00
§3 Dark Aqua #00AAAA
§4 Dark Red #AA0000
§5 Dark Purple #AA00AA
§6 Gold #FFAA00
§7 Gray #AAAAAA
§8 Dark Gray #555555
§9 Blue #5555FF
§a Green #55FF55
§b Aqua #55FFFF
§c Red #FF5555
§d Light Purple #FF55FF
§e Yellow #FFFF55
§f White #FFFFFF

The sixteen-color palette is fixed in legacy chat. Players cannot type arbitrary hex in survival without JSON APIs on the server side. Preview tools on community sites should map brand hex to the nearest palette slot and document the compromise instead of implying exact brand match in-game.

In-game chat on Java with commands or creative permissions permitting styled text might show a gold welcome line with white server name and yellow bold rules segment, built by concatenating §6, §f, §e, §l, and §r segments. A rules line might read gold Welcome, white server name, yellow bold rules, then §r reset before body copy continues in default color. Format codes stack until reset; bold plus italic is valid for emphasis on substrings.

Plugin config files use the ampersand form because YAML parsers handle it cleanly. Bukkit-family servers translate ampersand to section sign at runtime when parsing plugin messages. Operators who paste raw section signs into YAML sometimes break encoding on Windows editors; ampersand remains the safer authoring habit in repo-tracked configs.

Server MOTD in server.properties cannot embed § reliably in plain files on all editors, so properties use Unicode escape for the section sign: motd equals backslash-u00A76 for gold, backslash-u00A7f for white, and so on. The join screen reads those escapes as formatting codes on the client. Website MOTD previews should generate from the same source JSON as the properties file so marketing hex tables do not drift from what players see.

motd: "&6Welcome &fplayer &7| &aOnline: &e{online}"

YAML configs are the everyday authoring surface for plugin messages. Properties files and in-game books are separate channels with separate escape rules; document which file type your repo treats as source of truth.

Modern tellraw, adventure-mode books, datapacks, and Paper APIs use JSON text components with explicit color fields. Named colors match the sixteen-color set, such as color gold in JSON. Minecraft 1.16 and later adds hex colors in JSON only; that path does not extend to legacy section-sign codes typed in survival chat. Datapack authors and plugin developers use JSON when they need exact brand hex outside the sixteen-color palette.

Hex in JSON is an API and datapack feature, not a player-usable chat code. Survival players cannot type hash-prefixed hex in chat and expect rendering; they remain on the legacy palette unless a mod or permission plugin grants richer syntax on that server.

Plugin developers migrating from legacy ampersand strings to JSON components should regression-test NPC dialogue and holograms on the same build. Hex in JSON solves brand accuracy for scripted UI while chat commands may still use section-sign palette only.

Cross-platform networks should verify Bedrock clients via Geyser when JSON hex appears on Java-only datapacks; display may differ even when Java clients look correct.

{"text":"Custom brand","color":"#FF5733"}

Hex in JSON is an API and datapack feature, not a player-usable chat code. Bedrock Edition uses similar § codes in many contexts but differs in sign editing, tellraw availability, and addon JSON. Cross-platform servers serving Bedrock via Geyser or Floodgate should test both clients; color codes usually map, but formatting quirks exist on signs and NPC dialogue. For a full code table with MOTD copy-paste strings, see the Minecraft Color Codes reference page.

Roblox: BrickColor, TextColor3, and rich text

Roblox spans three-dimensional world color on parts and terrain, GUI text on screen, and in-experience chat filtered by platform rules. Each layer uses different APIs. Classic parts reference BrickColor, a large named enum such as Bright red, Really black, and Medium stone grey mapping to specific RGB values. Part.BrickColor and BrickColor.new(“Bright red”) set world geometry color. BasePart.Color accepts Color3 as RGB zero-to-one floats or Color3.fromRGB, decoupling from the BrickColor palette. Modern building favors Color3 for brand-accurate hues; BrickColor remains in legacy scripts and toolbox assets. BrickColor is not chat syntax. Players do not type BrickColor names to color default chat.

TextLabel, TextButton, and TextBox expose TextColor3 for uniform label color unless RichText overrides spans inside the string. Developers set TextColor3 with Color3.fromRGB in Lua; players do not inject Color3 into default player chat. A simple announcement label might set TextColor3 to two-fifty-five, eighty-five, eighty-five for brand red on the whole string before any markup runs.

With RichTextEnabled true, Roblox supports a subset of markup inspired by HTML. Supported patterns include font color as rgb with zero-to-two-fifty-five integers, font color as hex, bold, italic, underline, strikethrough, and br for line break. Not all HTML is valid. Arbitrary CSS, classes, and external fonts are blocked. Nesting must be well-formed; malformed tags render literally or truncate depending on client version.

Rich text applies to GUI the developer authors. Default player chat does not let players inject font tags; that would be a security and moderation nightmare.

When both TextColor3 and font tags apply, test on mobile and desktop; some client versions let nested rgb spans fight the parent TextColor3 in ways that look fine in Studio but wash out on device.

Centralize RichText string building in one ModuleScript so rgb literals are not scattered across twenty LocalScripts that will drift from brand JSON during the next recolor.

label.RichText = true
label.Text = 'Rules: <font color="rgb(255,85,85)">No spam</font> in chat.'

Games using TextChatService with custom channels can style messages via TextChatMessageProperties and bubble chat configurations. Colors come from Instance properties and developer-defined rules, such as team-colored prefixes, not from user-typed codes like Minecraft’s §e. Custom chat modules built in Lua can color role prefixes when the developer controls the pipeline; that is game-specific code, not a universal cheat sheet.

Discord: embeds, roles, and what standard messages cannot do

Discord is where expectations diverge most from reality. Standard user messages do not support arbitrary text color. The Discord client renders message body text with theme-defined foreground colors for light or dark mode. Users cannot wrap prose in a tag to make it red. Pasting #FF5555 into a sentence changes nothing about how that sentence renders. Community managers who expect Minecraft-style inline coloring in #general are working against the product’s security model, not a hidden setting.

What looks like colored chat on Discord usually comes from embed accent bars on bot or webhook messages, role name colors in the member list and optionally beside usernames in message headers, syntax highlighting inside fenced code blocks tagged with a language, or ANSI-colored output inside code blocks tagged ansi. None of those mechanisms color arbitrary words in a normal user-typed paragraph.

Embeds are structured attachment objects bots and webhooks send. They include an integer color field that tints the vertical accent bar on the embed card, not each character in the message body or the description field. The description text remains the client’s default foreground color. Only the left stripe and embed chrome reflect the embed color value.

Community managers typing in #general cannot achieve that stripe without a bot or webhook. Training docs should say so explicitly to prevent weekly support threads about hex in plain messages.

Bot backends should convert designer-facing hex input to decimal integer before calling the API; off-by-one color integers are a common bug when teams paste hex with hash into a field expecting decimal.

Dashboard previews must label what is colored: accent bar yes, message body no. That alignment with product behavior prevents false QA sign-off.

{
  "embeds": [{
    "title": "Patch notes v2.4",
    "description": "Balance changes inside the embed body still use default text color.",
    "color": 5814783
  }]
}

The color field is a decimal integer encoding 0xRRGGBB. Hex #58B8FF becomes decimal 5814783. Bots using Discord.js pass the same integer as hexadecimal literal zero-x fifty-eight B eight FF in the embeds array. Dashboards should preview the accent bar, not a rainbow message body, because description text stays default foreground color even when color integer is correct.

Webhooks follow the same embed rules. Without a bot or webhook, ordinary users cannot send colored embeds in normal guild text channels. Guild roles can set a color on the role object. That color appears on the member’s name in the sidebar and may appear beside their name in chat when role color in chat styling applies per client hierarchy. It does not let a user color arbitrary words inside a sentence. Role colors are moderation and identity features—VIP, admin, team badges—not a markdown color system for message bodies.

Syntax highlighting in language-tagged code fences uses grammar and client theme, not user-chosen hex for prose. ANSI blocks inside ansi-tagged fences apply a subset of terminal foreground and background codes within that block only. Useful for bot dashboards and monospace art; not for coloring normal announcements. Behavior can shift with client updates; test desktop and mobile.

Discord does not offer HTML spans, BBCode color tags, per-message user color pickers, or Minecraft § codes in standard chat. Section signs render as literal characters. For community announcements requiring brand-colored emphasis, use embed titles and fields, attachments as images, or external links—not assumptions that hex in the message string will render as inline color.

Cross-platform workflows and the moderation boundary

Platforms that block user-defined message colors do so deliberately. Arbitrary color enables phishing styled as admin alerts, hate symbol patterns, and invisible-text spam using dark gray on dark theme. Minecraft servers mitigate with permission plugins controlling who may use color codes. Discord centralizes restriction at the client. Roblox filters chat and keeps RichText on developer-controlled GUI.

When building tools that generate colored strings, escape § in user-supplied text before passing to Minecraft MOTD parsers; otherwise injection recolors admin banners. Validate Roblox RichText from untrusted sources and strip unsupported tags. Document for marketing that Discord copy must use embeds for accent color, not colored plain text, to avoid support tickets from community staff who pasted brand hex into announcements.

Minecraft server sites often preview MOTD colors in HTML using the same hex palette table, then export § strings for server.properties. Keep HTML hex and game codes synchronized from one JSON source; drift causes the website preview to lie about the join screen. Roblox experience hubs should define Color3 constants in a ModuleScript consumed by GUI RichText builders instead of scattering fromRGB literals across dozens of LocalScripts. Discord bot dashboards should expose embed color as hex input, convert to integer in the backend, and preview the accent bar—not a WYSIWYG rainbow message editor that cannot exist for standard user messages.

Case study: One palette, three broken launches

A mid-size game studio shipped a coordinated launch across a Minecraft Java survival server, a Roblox experience hub, and a Discord community hub in the same week. Brand handed all three teams a single JSON file with primary orange #FF8C42, secondary slate #4A5568, and success green #38A169, assuming hex travels like a logo SVG. Each team implemented independently. By Friday, social screenshots showed three different oranges and support channels filled with syntax confusion none of the leads had time to untangle.

The Minecraft contractor pasted hex into server.properties MOTD lines. Join screen showed literal hash characters and letters because legacy MOTD does not accept #FF8C42 in place of §6 gold-adjacent styling. Their plugin config used & correctly in YAML for join messages, but the MOTD property file mixed unescaped UTF-8 section signs that broke on the Linux host’s ISO-8859 editor, rendering blank color until a senior mod fixed escapes to \u00A7 form. Once colors appeared, orange was §6 gold #FFAA00, not brand #FF8C42, because nobody had mapped brand to the nearest palette slot and documented the compromise. Java plugin sidebar scoreboard used tellraw JSON with true hex for a hub NPC, which worked, but survival chat help text still used § codes only. Players saw two oranges depending on whether the string came from legacy or JSON path.

Roblox GUI team set TextColor3 from brand JSON on announcement labels, then enabled RichText for mixed emphasis without resetting TextColor3 on spans. Red warning lines inside RichText font tags rendered correctly; body text outside tags inherited a label TextColor3 that fought the nested rgb values on mobile clients, producing washed-out secondary slate on Android while iOS looked correct. A junior scripter put BrickColor names inside a custom chat module string hoping players could type them; players saw plain text “Bright orange” instead of colored prefixes. The fix was a ModuleScript BrandColors table with Color3 constants and a single RichText builder function used by all ScreenGui announcements. Default player chat remained uncolorable by design; role-colored prefixes required TextChatService rules the team should have planned on Monday.

Discord community staff scheduled a launch announcement as a normal user message with hex copied from brand guidelines, then as a second message with a bot embed whose color integer nobody had converted from hex. The user message looked default gray-white per theme. The embed showed the correct accent bar but body text still default, which the CM interpreted as bot failure. Marketing drafted a third variant using an ansi code block to rainbow the word LAUNCH inside a fence; desktop showed partial styling; mobile stripped several codes. Role colors for VIP and Developer had been set from brand secondary and success green, which tinted names in the member list but did not color the announcement sentences. Users asked how to “type green like Minecraft.” Moderators had no copy-paste answer because none exists for standard Discord messages.

Integration week ended with a single source-of-truth repo: brand-colors.json with hex, Minecraft § codes nearest match, Minecraft JSON hex for tellraw, Roblox Color3 triplets, and Discord embed color integers precomputed. MOTD preview on the marketing site regenerated from that file. Discord playbook stated explicitly that standard messages are not user-colorable; embed color tints the bar only; role colors affect names, not arbitrary message spans. Roblox playbook separated world Color3, GUI RichText, and filtered player chat. Minecraft playbook documented § versus & versus \u00A7 in properties versus YAML.

Launch rescheduled four days. Post-fix analytics showed no spike in “how do I color text” tickets. Minecraft join screen and hub NPC matched within palette limits. Roblox hub announcements looked consistent on Android and iOS. Discord patch notes embeds showed brand accent bars with readable default body text, which was the correct product behavior all along. The studio’s lesson was not learning three syntaxes by heart. It was learning three permission models: Minecraft lets servers color strings players see if plugins allow; Roblox colors only what developers paint; Discord colors chrome on embeds and names on roles, not the sentence you type in #general.

Minecraft gives you sixteen named hues and a section sign. Roblox splits world Color3, GUI RichText, and filtered chat. Discord reserves practical color control for embed accent bars, role name styling, and fenced ansi or syntax blocks—not for coloring ordinary user messages in channel bodies. Match the platform’s actual API and color becomes reliable instead of folklore repeated in three broken launch channels.