Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

CSS Inlay Colors

gra0007gra00074k downloads

Show inline color hints for CSS colors

Add to Obsidian
  • Overview
  • Scorecard
  • Updates11

Show inline color hints for CSS colors in Obsidian.

To use, just put any valid CSS color syntax in a code block like so: `#8A5CF5`.

Example of the extension running for all CSS color formats

Features

Color Picker

Enable the color picker setting to change a color using a color picker in live preview mode. Note that the color picker does not support opacity, and will only let you select from sRGB colors. It will attempt to preserve the existing format you have written, as well as any existing opacity.

Copy On Click

By default, colors can be copied to the clipboard by clicking on them. This only works in reading mode, and can be disabled in the plugin settings.

Hide Color Names

Surround a color with square brackets (`[#663399]`) to hide the color name and only show the inlay swatch in live preview and reading mode.

There's also an option in the plugin settings to hide all color names globally.

Custom Palettes

This plugin supports custom color palettes which you can use by enabling the setting and creating a CSS snippet file that targets the palette names you want to support.

Enabling the setting exposes classes for every inline code block surrounded by parentheses, replacing all spaces with hyphens, and converting to lowercase. For example, `(RAL 170 50 10)` exposes the class .ral-170-50-10. If that class gets a color set, it will show a color inlay.

Note, the plugin detects classes that target .css-color-inlay only, see the example below.

.css-color-inlay.my-cool-color { color: #663399; }
/* Or, use CSS nesting */
.css-color-inlay {
  &.my-hot-color { color: orangered; }
}
/* Now `(my cool color)` and `(my hot color)` will have inlays */

Predefined Palettes

There are 6 predefined color palettes you can download using the button in the settings, and it includes the following:

  • AutoCAD Color Index
  • Australian Color Standard (AS 2700)
  • British Standard Colors (BS 381, BS 4800)
  • Federal Standard (FS 595C, ANA)
  • RAL Colors (Classic, Design, Effect, Plastics)

Custom CSS

Customize the inlays by targeting the .css-color-inlay class. For example, you can make them circular with the following snippet:

.css-color-inlay {
  border-radius: 100px;
}

Development

This project uses Biome for linting/formatting and pnpm for package management. Run pnpm dev to build on changes.

76%
HealthGood
ReviewSatisfactory
About
Show inline color swatches for CSS color values in code blocks, live preview, and reading mode to view colors directly in your notes. Edit colors with a built-in picker, copy values by clicking, hide color names, and apply predefined or custom palettes via CSS classes.
CSS
Details
Current version
1.4.1
Last updated
6 months ago
Created
2 years ago
Updates
11 releases
Downloads
4k
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
Ko-fi
GitHub Sponsors
Author
gra0007gra0007
bengrant.dev
GitHubgra0007
  1. Community
  2. Plugins
  3. CSS
  4. CSS Inlay Colors

Related plugins

Style Settings

Adjust theme, plugin, and snippet CSS variables.

Lapel

Show the heading levels in the gutter of the editor.

CSS Editor

Edit CSS snippet files.

Admonition

Admonition block-styled content.

Custom Frames

Turn web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.

Snippetor

Create and tweak common snippets.

Blur

Create obfuscated blocks of text.

Show Whitespace

CSS styles and CM6 extensions to highlight whitespace in Source and Live Preview modes.

Columns

Create columns in Markdown.

Auto Card Link

Automatically fetches metadata from a URL and makes it as a card-styled link.