Philipp Reichelt48 downloadsColor folders and files in the file explorer from the context menu. Manage a color palette and export or import your colors to back them up or move them to another device.
Color folders and files in the file explorer from the context menu. Manage your own color palette, and export or import your colors to back them up or move them to another device.
To color several items, select them with Ctrl/Cmd or Shift, right-click and select Colorize n items.
| Setting | Description | Default |
|---|---|---|
| Folder style | Text, background, or text and background for folders. | Text and background |
| File style | Text, background, or text and background for files. | Background |
| Bold folder names | Show the names of colored folders in bold. | Off |
| Readable text colors | Darken or lighten colored names where needed so that they stay readable in light and dark themes. | On |
| Background strength | Opacity of the background color, 5 to 60 percent. | 10 percent |
Add, rename, recolor, reorder and remove colors. The order is used in the color picker. Removing a color also removes it from all files and folders.
Each color has a second color picker for dark themes. By default it matches the first one. Once you change it, the palette color uses that color in dark themes as it is, without adjusting it for readability. The reset button next to it goes back to the same color.
Lists every colored file and folder, with the color and whether a folder is colored recursively. Remove single entries, or clean up colors of files that no longer exist.
| Action | Description |
|---|---|
| Settings file | Path of a JSON file in your vault, colored-file-names.json by default. |
| Save to settings file | Writes palette, colors and appearance to the settings file. |
| Load from settings file | Replaces palette, colors and appearance with the content of the settings file. |
| Copy to clipboard | Copies palette, colors and appearance as JSON. |
| Import from JSON | Adds colors from pasted JSON. Palette colors with the same id and colors for the same path are overwritten. |
| Import from File Color | Shown when File Color is installed. Adds its palette, colors and options. With its "Cascade colors" option on, imported folders are colored recursively. |
Plugin settings are stored in the .obsidian folder, which many sync tools skip. The settings file is a normal file in your vault and is synced with your notes:
A colored item in the file explorer (.tree-item) gets the class cfn-colored and the custom properties --cfn-color (the palette color for the current theme, used for backgrounds) and --cfn-text-color (the color of the name, adjusted for readability). Folders colored with Recursive get cfn-cascade, items that take the color of such a folder additionally get cfn-inherited. The file explorer gets cfn-folder-style-<style> and cfn-file-style-<style>, where <style> is text, background or both, and cfn-bold-folders when Bold folder names is on.
/* Italic names for items that take the color of a recursively colored folder */
.cfn-inherited > .tree-item-self {
font-style: italic;
}
The plugin works entirely offline. It makes no network requests and collects no data. It writes to your vault only when you select Save to settings file, and reads the File Color configuration only when you import from it.
main.js, manifest.json and styles.css from the latest release.<your vault>/.obsidian/plugins/colored-file-names/.Requires Obsidian 1.13.0 or later.
Inspired by File Color by ecustic. This plugin is a separate implementation and does not contain its code.