Replies: 1 comment
-
AFAIK, tweaking the CSS filter is the only way, it's "cheap" and easy (Trilium used the same approach in early versions BTW), but limited. I've read some discussions suggesting that there might be a different theming mechanisms coming in the future. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I had a hard time to adapting my Trilium theme for the new excalidraw/canvas note. I tried to change the background color with css and it doesn't work, it seems color is controlled by js codes.
I try to mimic the way that excalidraw create its dark theme. Use a css filter to convert color from light to dark (plus some changes in css). So I think we can use a similar filter to convert to the color we need.
Then I use this filter generator to calculate the filter value. For example, my theme's main color is
#C8C2AA
. The generator give me this. (Please note that the result may vary, as the calculation is to find a color that close to target color, there will be a random loss.)However,
excalidraw
useswhite
as base color while the calculator useblack
. So we need to use the inversed color. Just use 100% minus the invert value, be like this.Then the css will be something like this.
The disadvantage of this method is that all the colors are filtered by css. So it't difficult to fine tune other color styles, as their colors are different from their hex values due to the filter.
I am a noob in css, if you have more intuitive and easy method or some magic tool that can help to adapt a custom theme for excalidraw in Trilium Notes, please share. 👍
Beta Was this translation helpful? Give feedback.
All reactions