javalent / admonitions

Adds admonition block-styled content to Obsidian.md
MIT License
1.07k stars 70 forks source link

Is it possible to change color palette for all defined types? #205

Closed HideoKun closed 2 years ago

HideoKun commented 2 years ago

Hi!

I would like to change all the colors for any 'ad-[type]' variant, but I am not able to find palette definition in your repo :)

How to find them? Thanks :)!

valentine195 commented 2 years ago

Default admonition colors are defined in this file as an RGB triad.

The title element is that same color at 10% alpha (see here)

HideoKun commented 2 years ago

Could we extract those colors to separate file - 'theme.css' or sth like that - to make it easily adjustable? I would like to use Nord-Theme instead of default colors. If so, this opens possibility to use this plugin as a core part of obsidian themes. It would be cool if themes could overload admonitions with their own css vars :)

valentine195 commented 2 years ago

They can - check out Ebullientworks.

The admonition css just looks for the --admonition-color CSS variable. You can you override that in a theme, and the admonition will use it instead. It just has to be defined as an rgb triad (--admonition-color: 220, 56, 36 or something)