lukasbach / obsidian-code-files

Plugin for ObsidianMD to show and edit code files along other notes.
122 stars 3 forks source link

Newest Update: Themes #21

Open Aetherinox opened 8 months ago

Aetherinox commented 8 months ago

Describe the bug With the recent update, the original theme now looks great on Obsidian Dark Themes. However, picking any other theme, makes the text dark red.

To Reproduce

Expected behavior Different themes should work.

Screenshots

Default Theme

R0tEzZa

Any other theme selected

Clouds

iXaKpjF

Brilliance Black

u6EJTUi

Tomorrow Night Eighties

1IRQiOO

Also tried restarting Obsidian after a theme change.

Additional context

lukasbach commented 8 months ago

Thanks for the notice, there was something wrong with how themes with transparent backgrounds were created. It should be fixed now, you don't need to update the plugin.

Note that Cloud is a bright VS Theme, so it will still look weird unless you change to a bright theme or uncheck the "Overwrite background with Obsidian background" in the plugin settings, just as a heads up.

Aetherinox commented 8 months ago

Yeah, it appears after I turned off the transparent background setting, I can see the changes now. Question, does the theme update the background, or does it also apply a new style to the code for variables, functions, classes, etc.

Because for dark themes, I appear to get the same color for text, except the background is different.

bR3QXFq

XMSRHTh

The only time I notice an actual change in the text colors is when I go from a dark theme to a light theme.

YAp5A4F

lukasbach commented 8 months ago

It updates both text token colors and background, though the background changes only apply if the option "Overwrite background with Obsidian background" is unchecked.

You can see how the themes are supposed to look like at https://editor.bitwiser.in/, those are the themes that are used in the plugin. It could very well be that there are some themes that only differ in background color, so it's hard to say if there is an issue in the themes you showed without knowing which exact themes you've tried, but please let me know if there is a theme that you tried that doesn't look like it's supposed to in the theme demo at the bitwiser URL.

Aetherinox commented 8 months ago

Ah ok.

I went through a few themes, and I'd say it appears about 95% accurate.

Such as with the "LAZY" theme. The colors appear to be very similar, except for the highlight color for the line I've selected. I'll have to test the CSS and see if that's me or some bug, because on mine, a highlighted line is unreadable.

ybUISHsKaH

Variables, methods, etc all seem to be changing slightly.


Edit: Yeah, I disabled / went to the Obsidian default theme and ensured no custom CSS was loaded, and that solid green line is still the same.

Actually, I have difficulties with colors that look similar, but the colors seem to be quite different between the two the more I look at it.

And if I turn off that "Override with Obsidian background" feature, I get blasted by god.

2iRY1jE

And just to confirm, this happens as well on a brand new Sandbox for Obsidian. No plugins at all installed, no themes (default).