The Background Color macro allows you to change the background color of content, for example, to highlight a block of content to make it stand out on a page. Any background color can be specified using either color names or hexadecimal color codes.
Navigate to the page you want to edit.
- Click the position on the page where you want to insert the macro. The macro placeholder can be repositioned later if required.
Click Insert More Content > Other Macros.
Select the Background Color macro from the Macro Browser.
Define the color using the color parameter and optional CSS.
Parameter Description Type Default Required
The background color for the content contained within the macro. This can be either a common color name (supported by most browsers) or a hexadecimal color code (supported by all browsers).
Option to apply a custom CSS class to the element. Enter the CSS class name(s) to apply to the macro (case sensitive); multiple classes can be separated by a space or comma. Do not include the
.selector in the class name. Classes must be part of your Global Confluence CSS or defined in a CSS Stylesheet macro that you have added to your page.
Click Insert. The macro placeholder displays with space to add your content to the body of the macro.
There are several built-in pastel colors ideal for use as backgrounds. Type the desired color to display one of the following:
Use standard browser color names to define additional colors, for example:
Hexadecimal color code
To define a specific color, for example to match a theme, use a hexadecimal color code, e.g. #003366:
Frequently Asked Questions
Q: Can I highlight just a few words within my text, rather than a whole block of content?
A: Yes. Use the Highlight macro.
Q: I’m using hexadecimal codes, but they are not working - why?
A: Unlike the Color macro, this macro requires the "#" at the start of the number.
Q: Where can I find HTML text color codes?
A: HTML Color Codes has a good color code reference page that shows each of the standard colors with the corresponding color code. If you want a groovy wall chart with color codes, try http://html-color-codes.com/.
Q: Some color names, such as "grey", don’t seem to work in all browsers - why?
A: Color names are supported differently by different browsers. To be 100% sure of getting the right color, use the hexadecimal color code instead.
Q: How do I change the color of text?
A: Use the Confluence text editor toolbar.
Q: How do I change the default background color of my page?
A: If you are using a standard theme, there are some limited options to change colors. If you are using the Builder Documentation theme, you have complete control over all colors using Builder CSS Custom Styles.
Q: Can I put a graphic in the background?