logo
search
SharePoint Document Issues

How to Add Custom Colors to SharePoint Managed Metadata Values

Elise WilliamsElise Williams Sep 30, 2026 868 views

Question details

The user needs to apply different background and text colors to 28 distinct managed metadata portfolio values in a SharePoint document library.

How to Add Custom Colors to SharePoint Managed Metadata Values
Product
SharePoint
Device & OS
not provided
Scenario
Customizing the visual display of a document library that uses managed metadata tags for better portfolio categorization and visual distinction.
Observed behavior
The managed metadata terms are currently displaying in standard plain text, and a method is needed to visually distinguish them using custom colors without requiring heavy coding.
Before you start

Before customizing your SharePoint list, ensure you have at least 'Design' or 'Edit' permissions for the document library and that your managed metadata column is fully populated.

Solution 1Recommended

Apply JSON Column Formatting for Managed Metadata

Use SharePoint's built-in column formatting feature to apply conditional styling based on metadata values using JSON.

SharePoint allows users to customize how fields are displayed using JSON code. This method is highly effective for applying unique background and text colors to managed metadata columns, even when dealing with multiple conditions.

1
Open Column Settings

Navigate to your SharePoint document library, click on the header of the managed metadata column, and select 'Column settings' followed by 'Format this column'.

2
Enter Advanced Mode

In the formatting pane on the right side of the screen, click 'Advanced mode' at the bottom to switch from the standard design interface to the JSON input box.

3
Apply JSON Conditional Formatting

Paste your custom JSON code. You will need to use nested 'if' statements to evaluate the column value (e.g., using `[$YourColumnName.Label]`) and apply the desired `background-color` and `color` CSS styles for each of your 28 portfolio terms.

4
Save and Verify

Click 'Save' at the bottom of the formatting pane. Review your document library to ensure each portfolio value now dynamically displays its assigned background and text color.

Apply JSON Column Formatting for Managed Metadata
JSON Syntax for Metadata: When referencing managed metadata columns in SharePoint JSON formatting, you often need to append '.Label' to the internal column name to successfully read the text value of the term.
Free Microsoft Office alternative

Enhance Your Document Workflow with WPS Office

While SharePoint effectively manages your cloud libraries, editing the actual Word, Excel, and PowerPoint files stored within them is easier with WPS Office. It provides a free, lightweight, and highly compatible alternative to Microsoft Office for all your document needs.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite on your device.
  2. 2. Open Your Documents: Download your files from SharePoint and open them directly in WPS Office for editing.
  3. 3. Edit and Save: Make your changes using the highly compatible tools, then save and re-upload the finalized documents back to your SharePoint library.
Fully compatible with Microsoft Office formats including .docx, .xlsx, and .pptx.Lightweight architecture ensures fast loading speeds and minimal system resource usage.Familiar tabbed user interface guarantees a seamless migration with zero learning curve.Comes with powerful built-in PDF editing, annotation, and format conversion tools.
microsoft office alternative - wps office

Frequently Asked Questions

Can I format SharePoint metadata columns without using JSON?

Basic 'Choice' columns can often be formatted using the visual UI (Design mode) in SharePoint. However, Managed Metadata columns are more complex and typically require Advanced mode (JSON) to apply specific conditional colors to different term labels.

Why is my JSON column formatting not applying to the metadata?

Ensure you are referencing the correct internal column name. For managed metadata, you usually must append '.Label' to the column name in your JSON condition (for example: `[$Portfolio.Label] == 'YourTermName'`) for the formatting rules to trigger correctly.

Is there a limit to how many conditions I can add in SharePoint JSON formatting?

While there is no strict technical limit that prevents 28 conditions, having highly complex JSON with dozens of nested 'if' statements can become difficult to maintain and troubleshoot. Ensure your JSON syntax (especially commas and brackets) is perfectly formatted to prevent rendering errors.