Background/Situation
A user wants to customize the appearance of the Project tool window to easily identify files that have been modified and differ from the version stored in the version control system. Specifically, to change the background color for these modified files, but the options under Settings | Version Control | File Status Colors only allow changing the foreground color.
Question
How to set a custom background color for modified files in the Project tool window?
Answer
It is possible to achieve this by using the File Colors feature:
- Open IDE Settings by pressing
Ctrl+Alt+Sor navigating to File | Settings (Windows/Linux) or IntelliJ IDEA | Settings (macOS) - Go to Appearance & Behavior | File Colors
- Click the + (Add) button to create a new file color rule
- In the dialog that appears:
- Enter a descriptive name for the rule, for example,
Modified Files Background - Click on the color preview next to the name field and choose the desired background color
- From the Scope dropdown menu, select the All Changed Files scope. This scope dynamically includes all files detected by the IDE as modified according to your VCS
- Click OK
- Enter a descriptive name for the rule, for example,
- Back in the File Colors settings page, ensure that the checkbox Use in Project View is enabled
- Click Apply and OK to save the settings
After applying these settings, all files marked as 'Modified' by the version control system in the Project tool window, will have the custom background color you selected.
Comments
0 comments
Please sign in to leave a comment.