Frewacom / pywalfox

Dynamic theming of Firefox (and Thunderbird) using your Pywal colors
https://addons.mozilla.org/en-US/firefox/addon/pywalfox/
Mozilla Public License 2.0
582 stars 12 forks source link

Issues with light theme #92

Open Ranguna opened 1 year ago

Ranguna commented 1 year ago

When using pywal to generate a light theme and applying it in firefox, some text becomes unreadable: The active tab: image

The extensions itself: image

The reason I want to explicitly use the light option though wal cli is because some tools like the terminal and vscode only change to the light option when generating the colors with that option.

Changing to the light option on the extensions makes things a bit more unreadable: image

Is there any way to make this extensions compatible with colors generated with the light cli option ?

Frewacom commented 1 year ago

You can modify the template used for picking the colors, but that is not really a solution. I don't quite remember how the .cache/wal/colors.json file look - does it include anything that would indicate that it is a "light" theme? If not, I guess pywalfox could check the brightness of some colors to try and figure out whether it is a light or dark theme.

Ranguna commented 1 year ago

Wow thanks for the fast reaction to this one!

As for whether colors.json indicates which color scheme is in use, unfortunately it does not :( Here's my colors.json at the moment:

{
    "wallpaper": "/path/to/my/image.png",
    "alpha": "100",

    "special": {
        "background": "#f9f9f9",
        "foreground": "#3e3e3e",
        "cursor": "#3e3e3e"
    },
    "colors": {
        "color0": "#f9f9f9",
        "color1": "#6e535d",
        "color2": "#93949f",
        "color3": "#bfa2ab",
        "color4": "#a8bcc8",
        "color5": "#ccabc3",
        "color6": "#cdbcb3",
        "color7": "#3e3e3e",
        "color8": "#bababa",
        "color9": "#6e535d",
        "color10": "#93949f",
        "color11": "#bfa2ab",
        "color12": "#a8bcc8",
        "color13": "#ccabc3",
        "color14": "#cdbcb3",
        "color15": "#3e3e3e"
    }
}

I also created https://github.com/dylanaraps/pywal/issues/685, with the hopes that maybe we could standardize this somehow, either by including both color schemes in colors.json or not recommending consumers to have a dark/light option in each application.

If not, I guess pywalfox could check the brightness of some colors to try and figure out whether it is a light or dark theme.

Is there a reason you need to know which theme is active ? The vscode extension and the terminal emulator theme simply uses the active theme and won't give you the option to toggle; if you want to change, you'll have to run the wal command with or without the -l flag. So maybe the same could be done in pywalfox (if wal does not provide two color scheme in the colors.json): not having the option to choose between dark and light and simply use the colors in colors.json.

Frewacom commented 1 year ago

Is there a reason you need to know which theme is active ?

I think the colors that should be used when theming the browser is different for light and dark mode. Using the same color indicies for light mode results in a very ugly looking theme, which is why I do some manual adjustments to the colors in the code when light mode is activated. I haven't looked at this in a long time, so I might be wrong though.

Ranguna commented 1 year ago

Makes sense, I can try taking a look at this in the future and check which colors the terminal and vscode use for text and focus text, thanks for all the info!

holmescharles commented 4 months ago

Any progress on this? I am experiencing the same issue.

Packjackisback commented 3 months ago

Yep, same thing, the only way I see now is forking it.

Ranguna commented 2 months ago

@Packjackisback or propose a PR

holmescharles commented 2 months ago

@Ranguna, this repo does not seem to be maintained anymore, unfortunately. So a fork would be best.

Ranguna commented 2 months ago

Hmmm maybe @Frewacom are you still around?

Frewacom commented 2 months ago

@Frewacom are you still around?

Yes, I am just busy with other stuff. PRs are appreciated.

Ranguna commented 2 months ago

Yes, I am just busy with other stuff. PRs are appreciated.

Good to know, thanks!