The Highlight macro changes the background color of a section of content. This is useful for small amounts of content such as a word, heading, or single sentence.  To highlight larger blocks of text, use the Background Color macro.

Instructions

  1. Navigate to the page you want to edit.

  2. Click Edit.

  3. Select the text you want to high, or click the position where you want to add highlighted text.
  4. Click Insert More Content Other Macros.

  5. Select the Highlight macro from the Macro Browser.

    The Macro Browser with the Highlight macro available.
  6. Define the color to apply. If you have selected text in step 3, it is displayed in the preview panel of the macro editor.

    Parameter

    Description

    Type

    Default

    Required

    Color

    Specify the color to be used. This can be either a common color name (supported by most browsers) or a hexadecimal color code (supported by all browsers).

    There are several special pastel colors: yellow (default), red, blue, cyan, green and purple.

    string

    yellow

    (tick)

    CSS Class

    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.

    string

    none

    (error)

  7. Click Insert. The macro placeholder displays. If you haven't already selected the text to highlight, enter the required content.

  8. Save the page to render the highlighted text.

Examples

There are several built-in pastel colors ideal for use as backgrounds which can be set as follows:

Color parameter set to red, yellow, green, cyan, blue and purple respectively.
Text showing standard colors available with the Highlight macro.

With Color parameter set to orange and violet respectively.

An example of the Highlight macro coloring text orange and violet.

Hexadecimal color code

To ensure a precise color is applied, use a hexadecimal color code, e.g. #66FF66.  My notes.

Try to keep a contrast between the text and the background, so that it is still clearly readable. 


Frequently Asked Questions

Q: Can I highlight an entire block of content?

A: Yes. The Background Color macro is better suited in this case.


Q: I’m using hexadecimal codes, but they are not working - why?

A:This macro requires that "#" is included at the start of the code.


Q: Where can I get HTML text color codes?

A: There are several websites that provide color codes. Try HTML Color Codes or w3schools.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 Confluence's text formatting tools found on the toolbar.


Q: How do I change the default background color of my page, etc?

A: If using a standard theme, there are some limited options to change colors. If using the Builder theme, complete control over all colors are provided using Custom CSS Styles.


Q: Can I put a graphic in the background?

A: Yes. Span Tag and Style Sheet enable more formatting to your content.