How to Use Different Colors for TOC Numbers and Headings in Word
Question details
The user wants to format a Table of Contents so that the numbering appears in a different color than the associated heading text.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Customizing document layout and styling for a professional report or book formatting.
- Observed behavior
- By default, the Table of Contents inherits its formatting directly from the heading styles, making it difficult to apply separate colors to the numbering and the text without them matching.
Ensure your document's headings are properly tagged with standard styles (like Heading 1, Heading 2) before customizing the Table of Contents colors.
Use a Style Separator to Format Numbering and Text Separately
By using a style separator, you can combine two paragraphs with different styles into a single line. This allows you to color the numbering separately from the heading text without breaking the Table of Contents.
Microsoft Word normally inherits the Table of Contents formatting directly from the heading styles in the document body. To trick Word into using two colors on one line, you must separate the numbering from the heading text using a hidden formatting mark called a style separator.
Type your heading number in one paragraph and your heading text in the paragraph directly below it.
Apply a custom numbered style (with your desired color) to the first paragraph. Apply your standard Heading style (e.g., Heading 1, colored black) to the second paragraph.
Place your cursor at the end of the first paragraph (the numbered one) and press Ctrl+Alt+Enter. This inserts a style separator, merging the two paragraphs onto a single line while retaining their distinct styles.
Navigate to the 'References' tab, click 'Update Table', and choose to update the entire table. The Table of Contents will now reflect the distinct formatting for the numbers and the text.

Easily Customize Table of Contents Formatting with WPS Office
WPS Writer provides intuitive tools for managing heading styles and generating a professional Table of Contents. You can effortlessly adjust formatting, update layouts, and maintain perfect compatibility with Microsoft Word documents.
- 1. Open your document: Launch WPS Writer and open your document, then navigate to the 'References' tab.
- 2. Insert a Custom Table of Contents: Click on 'Table of Contents' and select 'Insert Table of Contents' to open the customization menu.
- 3. Modify TOC styling: Adjust the TOC levels and click on 'Options' to customize how styles are mapped to your Table of Contents.
- 4. Update your TOC: Click 'Update TOC' in the ribbon anytime you make changes to your heading styles or document structure.

Frequently Asked Questions
Why does my Table of Contents numbering color revert to black when updated?
This happens because the TOC automatically pulls formatting from the source Heading styles in the document body. If the source heading style doesn't use a style separator for the number, the TOC will revert to the default text color upon updating.
How do I insert a style separator if the Ctrl+Alt+Enter shortcut doesn't work?
You can manually add the Style Separator command to your Quick Access Toolbar. Go to Word Options > Quick Access Toolbar, select 'All Commands' from the dropdown menu, locate 'Style Separator', and click 'Add'.
Can I change the color of the page numbers in the TOC independently from the headings?
Yes. You can modify the specific TOC style level (e.g., TOC 1, TOC 2) by opening the Styles pane, right-clicking the corresponding TOC style, and choosing 'Modify'. From there, you can change the default color of the page numbers and leader lines without affecting the document body headings.




