Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark/Light Theme mode: Define keywords color / backgroundcolor depending on day/night mode? #49

Open
schittli opened this issue Feb 26, 2022 · 3 comments
Assignees

Comments

@schittli
Copy link

schittli commented Feb 26, 2022

Hello

thank you for creating release 2 of this plugin and sharing your great work!

Could you please think about offering support for dark/light (or day/night) themes and allow us to define colors depending on it?
Somethin like that:

{
    "text": "### …",
    "regex": {
        // this is a 'TODO Highligt' bug: Regex for "start of line": ^ does not work, 
        // probably because it uses wrong Regex option 'multilne / single' line parsing
        "pattern": "(?<=(?:\\r\\n?|\\n)\\s*)(#{3}(:|\\s).*)(?=\\r\\n?|\\n)?"
    },

    // keep the backward compatibility
    "color": "red",
    "backgroundColor": "rgba(245, 39, 145, 0.09)",

    // The new dark/light mode
    "LightModeColor": {
      "color": "",
      "backgroundColor": ""
    },
    
    "DarkModeColor": {
      "color": "",
      "backgroundColor": "",
    }
},

Thanks a lot, kind regards,
Thomas

@jgclark
Copy link
Owner

jgclark commented Feb 26, 2022

Many thanks for your bug report and excellent suggestion. I have been thinking about the same need for different colours. Your suggested syntax seems sensible too.

@ygoe
Copy link

ygoe commented Aug 31, 2022

Is there any progress here? I just stumbled over the same problem. I've created my own colour themes for light and dark (mainly to move my settings.json customisations into a clean theme and so that I can quickly switch between light and dark theme). But the foreground colour is now fixed for one theme and hardly readable for the other. Can I include the TODO text colour in my theme or what options do I have now?

@jgclark jgclark self-assigned this Apr 13, 2023
jgclark added a commit that referenced this issue Apr 13, 2023
@exastone
Copy link

exastone commented Nov 1, 2023

Chiming in here with an idea that might lead to a better one; I'd like to suggest exposing theming api specifiers so colouring can be defined by theme authors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants