docs / articles / All Discord Code Block Colors

All Discord Code Block Colors

Noah Aug 16, 2026 2026-08-16 04:58:21

Discord, the popular communication platform, stands out by offering a diverse range of features for its users. Among these, the code block functionality is a standout, enabling users to format messages as code snippets for better readability. Adding a touch of visual differentiation, Discord allows customization of the background color for these code blocks. Let's explore the various code block colors available in Discord and how to apply them.

Organized & Aesthetic: Color Codes for Google Sheets in Every Shade🌟
Organized & Aesthetic: Color Codes for Google Sheets in Every Shade🌟

Code blocks in Discord enhance the appearance of message content, making them easier to read, especially for programming code snippets. When you indent a message with four spaces (or use backticks ` ` to create a code block), Discord automatically formats it, and you can then choose the color to match your theme or preference.

a black and white photo with the words id 1222 on it's left side
a black and white photo with the words id 1222 on it's left side

Default Code Block Colors in Discord

Discord comes with a set of default colors for code blocks. These are:

Hex Codes for GoodNotes5
Hex Codes for GoodNotes5
  • 170, 55, 181 – a vibrant purple
  • 248, 184, 102 – a warm yellow
  • 255, 208, 55 – a bright gold
  • 190, 150, 255 – a soft lavender

These colors cover a range of hues, providing options for various preferences or server themes.

Discord Color Palette
Discord Color Palette

To apply a default color, simply use the color code (without the hashtag) in your code block. For example, to use the warm yellow color, indent your message with four spaces and add a code block like this:

Your message here

Choosing Custom RGB Colors

While the default colors cater to various preferences, Discord also allows users to choose custom colors. You can use any RGB color to create your code block color. For instance, to use a deep blue (RGB: 0, 121, 125), your code block would look like this:

a color chart with the numbers in different colors and letters on each side, including one letter
a color chart with the numbers in different colors and letters on each side, including one letter

Your message here

To ensure optimum readability, maintain adequate contrast with your chosen color. Tools like WebAIM's Contrast Checker can help you verify color contrast.

Applying Code Block Colors in Discord

To apply a custom color to your code block in Discord, follow these steps:

the colors in this game are all different
the colors in this game are all different

1. Open your Discord client (on desktop or web) and navigate to any text channel.

2. Compose a new message and enter your code snippet, indenting with four spaces or wrapping it in backticks (`` ` ``).

an old - school computer game with the names of different colors and numbers on it
an old - school computer game with the names of different colors and numbers on it
Hexs
Hexs
an iphone's keyboard with different languages on it
an iphone's keyboard with different languages on it
an image of the back side of a poster with different font and numbers on it
an image of the back side of a poster with different font and numbers on it
Discord Blue color hex code is #5865F2
Discord Blue color hex code is #5865F2
Polar pink discord color theme
Polar pink discord color theme
Halloween Color Codes, Succubus Color Palette, Dark Color Hex Codes, Cool Color Palette With Hex Codes, Google Slides Color Palette Codes, Hex Code, 2000s Color Palette, Yami Kawaii Color Palette, Unique Color Names
Halloween Color Codes, Succubus Color Palette, Dark Color Hex Codes, Cool Color Palette With Hex Codes, Google Slides Color Palette Codes, Hex Code, 2000s Color Palette, Yami Kawaii Color Palette, Unique Color Names
Color Palette #306
Color Palette #306
Discord Color Picker - Customize Your Discord Experience
Discord Color Picker - Customize Your Discord Experience

3. Right-click on the code snippet. In the context menu, select Format.

4. In the Format Message window, find the Color field. Here, you can choose a default color or input your custom RGB color code.

5. Once you've selected your desired color, click Apply. Your code block will now display in your chosen color.

Using Code Block Colors to Organize and Differentiate Information

Code block colors can significantly improve the organization and readability of your messages. On busy servers with high message volume, using distinctive colors can help important information stand out. For instance, you might use a bright color for urgent announcements or warnings, or a soft color for non-urgent, general information.

Moreover, you can use different colors to signify different roles or types of messages. For example, a specific color might represent messages from the community management team, while another indicates technical support messages. This approach can enhance user experience and perception of professionalism on your server.

Finally, code block colors can be a subtle yet effective way to customize your Discord experience. By carefully choosing colors that reflect your taste or align with your server's theme, you can create a welcoming and consistent atmosphere.

In exploring the various code block colors available in Discord, we've discovered a versatile tool for enhancing communication and organization on the platform. Whether you're looking to boost readability, differentiate important messages, or simply add a touch of personal style to your server, Discord's code block colors offer a myriad of possibilities.