Automatically detect and highlight color codes in your notes.
Color Highlighter provides a visual representation of colors directly in your text, making it easier to work with color-related information. Customizable options allow you to control where and how your highlights appear.
[!NOTE] This plugin is currently in beta. Please report any issues or leave feedback to help improve it.
As this plugin is currently in beta, it's not yet available in the Obsidian community plugins directory.
To install:
main.js
, manifest.json
, and styles.css
)..obsidian/plugins/color-highlighter
.BRAT (Beta Reviewers Auto-update Tool) is a community plugin that makes it easier to review and test new plugins and themes that are still in beta. Updates are downloaded automatically without the need for the user to manually change any files.
To install using BRAT:
https://github.com/heatherpiper/color-highlighter
Once installed and enabled, the plugin will automatically detect and highlight color codes based on your settings. To configure the plugin, go to Settings → Community plugins. Find Color Highlighter in the list and select the gear icon to access its settings.
Choose what part of your notes to highlight color codes in:
You can further refine the appearance of highlights with style-specific adjustments.
Background adjustments:
Border adjustments:
Square adjustments:
Underline adjustments:
You can override the default highlight style on a per-note basis using a note's frontmatter (properties). Add highlightStyle
as a new property to a note's frontmatter and indicate which style you want to use for that note. The available options are background
, border
, square
, or underline
.
Example:
---
highlightStyle: underline
---
If no valid highlightStyle
property is found, the default style indicated in the settings will be used.
You can also easily set a note's highlight style by selecting the command Color Highlighter: Set highlight style for this note from the command palette and then choosing your preferred highlight style from the drop-down menu.
If your highlight style is set to background or square, you can choose to enable a contrasting border that appears around low-contrast highlights. This adds a faint border around highlights if there is not sufficient contrast between the highlight color and the editor's background color.
By default, a color picker is displayed when hovering over highlighted color codes. You may choose to disable this behavior.
If this setting is disabled, the color picker can still be displayed by selecting the command Color Highlighter: Show color picker in the command palette. Your cursor must be on a highlighted color for this command to be available.
As this plugin is in beta, your feedback is crucial! If you encounter any issues or have suggestions for improvements:
Contributions are welcome! Feel free to fork the repository and submit pull requests.