Skip to content

Theming

Five presets drawn from the Tailwind CSS palette. Pick one with the theme attribute and the whole UI (launcher, panel, selection highlight) retints to match the host site's brand.

ThemeAccentWorks well on
blue (default) #0058d0neutral SaaS dashboards
violet #7c3aedcreative / AI tools
emerald #059669docs, fintech, admin panels
orange #ea580cmarketing sites
rose #e11d48bold consumer brands
html
<patch-mark theme="emerald" visible></patch-mark>
js
tool.themeName = 'rose';            // switch preset at runtime
tool.theme = { accent: '#ff6d01' }; // fine-grained override, wins over the preset

CSS custom properties

Every color token is a CSS custom property, so host pages can restyle the component from plain CSS or register their own named preset:

css
patch-mark {
  --pm-accent: #ff6d01;
  --pm-accent-dark: #c25400;
}

/* custom preset, used as <patch-mark theme="brand"> */
patch-mark[theme="brand"] {
  --pm-accent: #ff6d01;
}

For one-off tweaks, set the variables inline or from your own stylesheet:

html
<patch-mark style="--pm-accent: #0a84ff"></patch-mark>
VariableDefaultControls
--pm-accent #0058d0launcher, selection highlight, primary buttons
--pm-accent-dark #003f99launcher gradient end, hover/active states
--pm-accent-soft rgba(0, 88, 208, 0.12)selection fill, tinted chip backgrounds
--pm-surface-muted #eaf2ffsubtle hover surface, hint bars
--pm-line / --pm-line-strong rgba(0, 54, 128, 0.14 / 0.24)hairlines and borders
--pm-panel-solid #ffffffpanel background
--pm-ink / --pm-muted / --pm-foreground #0b1220 / #506070 / #111827text colors
--pm-on-accent #fffffftext and icons on accent
--pm-font-monoIBM Plex Mono stackmonospace font

MIT Licensed