Superschnizel / obisdian-fast-text-color

Obsidian plugin to enable colored text with a custom syntax.
GNU General Public License v3.0
18 stars 2 forks source link
markdown obsidian-md obsidian-plugin

Fast Text Color

This Obsidian plugin allows you to create beautifully colored interactive notes using a custom coloring syntax.

Features

Usage

Color text sections using the following syntax:

~={id} This text is colored according to the id=~

The id maps to one of the color formats provided by the current active theme, which can be selected in the settings.

The formatting options include:

These options are handled using CSS classes, which means that any changes will be applied to preexisting sections marked with the respective id retroactively.

Themes

Colors are bundled into themes, which can be created and edited in the plugin settings. You can also pick the global active theme there.

If you want to override your global active theme for a specific note, you can do so by setting the frontmatter property ftcTheme to the name of the theme you wish to use.

Applying Color

Editor Context Menu

Right clicking on highlighted text lets you change the color via the context menu. All colors included in the current theme will be available.

Interactive Delimiter

If the interactive delimiter option is enabled in the settings (default), you can change or remove the color of text using the interactive delimiter shown in place of the color name.

Coloring Menu

Calling the change text color command opens the coloring menu, which allows you to choose the color of the selected text or insert a colored section if no text is selected.

You can select a color by clicking the corresponding button or using the keybind assigned in the theme editor. Keybinds can be disabled entirely in the settings, if desired.

Known Issues

These issues mainly arise from the different techniques required for live preview and reading mode and will be fixed in the future.

Planned Features

How It Works

This plugin uses a custom parser, which allows the coloring to interact with the established Obsidian Markdown syntax. A CSS class containing the specified style options is created for each color id.