Get AI summaries of any video or article — Sign up free
How to customize Obsidian Callouts with your very own SVG icon created in Excalidraw thumbnail

How to customize Obsidian Callouts with your very own SVG icon created in Excalidraw

5 min read

Based on Zsolt's Visual Personal Knowledge Management's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Custom Obsidian callout types are created by adding CSS snippets under the vault’s .obsidian/snippets folder and defining the callout selector, color, and icon.

Briefing

Obsidian callouts can be customized with your own SVG icons, and the most flexible workflow combines CSS snippets with either built-in Lucide icons, pasted SVGs from icon libraries, or custom-drawn icons exported from Excalidraw. The payoff is simple: a “memory” (or any other custom category) can get a distinct color and a tailored icon that matches your note-taking system.

Callouts in Obsidian are highlighted sections that carry both an icon and a color, and they can be folding (collapsed/expanded) for cleaner reading. Out of the box, Obsidian provides many callout types—note, abstract, info, tip, success, question, warning, failure, quote, example, bug, danger—often with aliases (for instance, “failure” can also be “fail” or “missing”). Creating a callout is done by writing a quote block and adding a bracketed keyword that starts with an exclamation mark; Obsidian recognizes the keyword and renders the corresponding callout styling.

For custom callout types, the key mechanism is a CSS snippet stored in the vault’s .obsidian/snippets folder. The snippet defines the new callout selector and assigns a color (typically an RGB value) plus an icon. The workflow starts with copying Obsidian’s help-provided template and replacing the callout type name and color. For icons, the easiest path is using Lucide icons, which are already supported by the CSS approach: insert the icon name (e.g., a Lucide “album” icon) into the snippet, then reload Obsidian to make the icon appear.

When Lucide doesn’t have the right look, the transcript shows two alternatives. First, icon libraries like Font Awesome can be used by copying the “SVG code” and pasting that SVG text directly into the CSS snippet (between quotes). Second—and the focus of the tutorial—icons can be created from scratch in Excalidraw. The process begins by drawing within a fixed-size boundary (commonly 512×512) using Excalidraw’s “set dimensions” automation script, keeping the design simple and preferably single-color for small readability.

After drawing, the SVG export settings matter: set svg padding to zero, export transparent backgrounds, and ensure the export uses light-mode colors so the icon’s strokes/fills come out as expected. The SVG is then saved into the vault, opened, and cleaned up. The transcript recommends svgOMG to reduce and simplify the SVG output, then further editing in a text editor to remove unnecessary parts like definitions and the outer rectangle.

The crucial styling step is making the icon inherit Obsidian’s callout color. That’s done by replacing hardcoded black (#000000) strokes with the CSS keyword currentColor, so the icon automatically adopts the color defined for the callout. If the icon includes other fixed colors (like a white heart), those can be swapped to CSS variables tied to the theme (e.g., text title h1 or text accent), letting the icon adapt across themes such as default Obsidian, Groov Box, and others.

In short: define a custom callout in CSS, attach an SVG icon, and use currentColor (plus optional theme variables) so the icon stays visually consistent as colors and themes change. The result is a memory callout (and any custom callout) that looks exactly the way the user wants—without needing traditional programming.

Cornell Notes

Obsidian callouts can be extended with custom types by defining CSS snippets in the vault’s .obsidian/snippets folder. Each custom callout can be assigned both a color and an icon, using either built-in Lucide icons, pasted SVG from libraries like Font Awesome, or SVGs created in Excalidraw. For custom icons, the workflow is: draw inside a fixed-size canvas (e.g., 512×512), export with zero padding and transparent background, clean the SVG (svgOMG), then edit it so strokes use currentColor. That change makes the icon inherit the callout’s color automatically, and theme variables (like text accent) can be used to recolor internal elements such as a heart. This approach keeps icons consistent across themes and avoids manual recoloring.

How does Obsidian turn a typed keyword into a callout with an icon and color?

Callouts are created by starting a quote block and adding a bracketed keyword that begins with an exclamation mark (e.g., !warning, !failure). Obsidian recognizes the keyword and renders the corresponding callout style, including the built-in icon/color. Folding callouts are created the same way, but the callout can be collapsed/expanded so the content hides when closed.

Where do custom callout CSS snippets live, and what’s the basic structure?

Custom callout styling is stored as CSS snippets under the vault’s .obsidian/snippets folder. The tutorial uses the Obsidian help template: copy the snippet, replace the callout type name (e.g., tweet → memory), set the RGB color, and define the icon content. After saving, Obsidian may require a page reload (navigate away and back) for the icon to render.

What are the three icon sources shown, and when should each be used?

(1) Lucide icons: easiest when the desired icon exists; insert the Lucide icon name into the CSS snippet. (2) Font Awesome: copy the “SVG code” and paste the SVG into the CSS snippet so Obsidian renders it. (3) Excalidraw: use when no existing icon matches; draw a simple design, export as SVG, clean it, and edit it so it inherits callout color via currentColor.

Why does the tutorial replace #000000 with currentColor in the SVG?

Hardcoded colors in the SVG prevent the icon from matching the callout’s configured color. Replacing black strokes with currentColor makes the SVG inherit the CSS color applied to the callout, so the icon automatically changes when the callout color changes and stays consistent across themes.

How can theme-dependent recoloring be handled for parts of the SVG that aren’t strokes?

If an SVG element uses a fixed fill color (like a white heart), it may not adapt when themes change. The transcript suggests finding the appropriate Obsidian CSS variable in the developer console (e.g., text title h1 or text accent) and replacing the fixed color (like #ffffff) with var(--text-accent) style variables. This lets the icon recolor to match the active theme (default, Groov Box, etc.).

What Excalidraw export settings prevent layout issues when the SVG is used as an icon?

The tutorial sets svg padding to zero so the exported artwork fits the intended bounding box (e.g., exactly 512×512). It also exports with a transparent background and forces light-mode so the icon’s colors come out as expected. These settings reduce clipping and unwanted borders when the SVG is inserted into Obsidian callouts.

Review Questions

  1. What steps ensure an Excalidraw-exported SVG fits a fixed icon size and doesn’t include extra padding?
  2. How does currentColor change the behavior of an SVG icon inside a CSS-defined Obsidian callout?
  3. If a theme change leaves part of the SVG (like a heart) the wrong color, what method can be used to map that element to an Obsidian theme variable?

Key Points

  1. 1

    Custom Obsidian callout types are created by adding CSS snippets under the vault’s .obsidian/snippets folder and defining the callout selector, color, and icon.

  2. 2

    Lucide icons offer the quickest path: insert the Lucide icon name into the CSS snippet and reload Obsidian so the icon renders.

  3. 3

    Font Awesome icons can be used by copying SVG code and pasting the SVG text into the CSS snippet content.

  4. 4

    For fully tailored icons, draw in Excalidraw inside a fixed-size boundary (commonly 512×512) and export with svg padding set to zero and a transparent background.

  5. 5

    Clean and shrink exported SVGs using svgOMG, then remove unnecessary SVG components (like definitions and outer rectangles) for a leaner icon.

  6. 6

    Replace hardcoded stroke colors (e.g., #000000) with currentColor so the SVG automatically inherits the callout’s configured color.

  7. 7

    For internal fills that don’t follow strokes (e.g., a white heart), replace fixed colors with Obsidian CSS variables such as text accent to adapt across themes.

Highlights

Custom callouts become truly personal when the icon is an SVG that inherits the callout color via currentColor.
Excalidraw export settings—especially zero svg padding and transparent background—prevent clipped or mis-sized icons in Obsidian.
svgOMG plus targeted SVG edits (removing definitions/outer shapes) can make Excalidraw icons practical for use as small UI glyphs.
Theme-aware recoloring is achievable by swapping fixed SVG colors to Obsidian CSS variables discovered through the developer console.

Topics

  • Obsidian Callouts
  • CSS Snippets
  • SVG Icons
  • Excalidraw Export
  • Theme Variables