SharePoint Document Issues

How to Fix Black Background for TXT Files in SharePoint

WPS EditorWPS Editor Oct 10, 2026 871 views

Question details

Users need to resolve an issue where plain text files display with a dark background and gray text.

How to Fix Black Background for TXT Files in SharePoint
Product
SharePoint
Device & OS
not provided
Scenario
Viewing TXT files in a SharePoint environment that utilizes a dark theme.
Observed behavior
The SharePoint dark theme incorrectly applies a black background and gray text to TXT files, making them difficult to read.
Before you start

Verify your current SharePoint site theme settings and confirm whether this dark background behavior is isolated to plain text (TXT) files or if it affects other file types as well.

Solution 1Recommended

Request Developer Assistance in Microsoft Q&A

Because this display issue is caused by SharePoint's page-development and theming architecture rather than a standard file setting, you must consult specialized Microsoft support.

A dark SharePoint theme automatically forces a black background and gray text onto plain text (TXT) files. Since this behavior is tied deeply to the theme palette and site development, it cannot be turned off via standard document library options.

1
Gather Theme Details

Collect your current SharePoint theme palette, custom colors, and note the specific affected file behavior.

2
Navigate to Microsoft Support

Go to the official Microsoft Q&A forum at https://learn.microsoft.com/en-us/answers/.

3
Post Your Inquiry

Create a new question and include the tags 'SharePoint development' or 'Microsoft Graph' to ensure your question reaches the correct theming experts.

Request Developer Assistance in Microsoft Q&A
Temporary Workaround: While awaiting a fix for the theme behavior, consider converting your TXT files to DOCX or PDF formats before uploading, as these formats usually retain their intended white background.
Free Microsoft Office alternative

Manage Your Documents Seamlessly with WPS Office

Avoid unexpected display overrides like the SharePoint dark theme issue by managing your documents locally. WPS Office is a highly compatible, free, and lightweight alternative to Microsoft Office that ensures your text documents are displayed correctly.

  1. 1. Download the Software: Visit the official WPS website and download the free WPS Office suite.
  2. 2. Install WPS Office: Run the installer and follow the on-screen instructions to set up the software on your device.
  3. 3. Open Your Text Files: Launch WPS Writer to open your TXT or DOCX files and view them with perfectly preserved formatting and backgrounds.
Consistent document formatting without unexpected dark theme background overrides.High compatibility with Microsoft Office file formats including DOCX, XLSX, PPTX, and TXT.Lightweight installation with a familiar, easy-to-use interface.Completely free to download and use for your daily document needs.
microsoft office alternative - wps office

Frequently Asked Questions

Why do my TXT files have a black background in SharePoint?

This happens when a dark theme is applied to your SharePoint site. The SharePoint theming engine automatically overrides the background of plain text (TXT) files, changing the background to black and the text to gray.

Can I fix the dark background by changing TXT file settings?

No. The black background is controlled by SharePoint page-development and theming behaviors. It cannot be resolved by modifying standard file properties or document library settings.

What is the best workaround to display text with a white background in SharePoint?

The simplest workaround is to convert your plain text files into DOCX or PDF formats before uploading them. These formats maintain their original document background colors regardless of the site's dark theme.