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

Inconsistent Color Mapping and Proposal for Custom Color Replacement #108

Open
m0r4a opened this issue Dec 14, 2024 · 4 comments
Open

Inconsistent Color Mapping and Proposal for Custom Color Replacement #108

m0r4a opened this issue Dec 14, 2024 · 4 comments

Comments

@m0r4a
Copy link

m0r4a commented Dec 14, 2024

Description

I have this problem/nitpick/thingy with the color generation, the "inconsistency" of colors when processing images. For instance:

  • In one image, colors 1, 3, and 5 might form a gradient based on the primary color.
  • In another image, these same colors could be completely unrelated.

I get that this is just how pywal works, but I’ve been thinking about a way to handle this with custom color replacements for specific images.

Possible solutions

  1. External Script:
  • Write a separate script that replaces colors in the files after they’re generated.
  • This works but feels a bit messy.
  • It's less than ideal bout would not have to commit to the repository directly or if I do a fork, maintain the project.
  1. Built-in Replacement Feature:
  • Add a function that reads a config file (maybe JSON) and replaces colors during the export process.

Example of the JSON:

{
  "wallpaper1": {
    "color1": "color5",
    "color4": "color9",
    "color2": "color6"
  },
  "wallpaper2": {
    "color4": "color3"
  }
}

Questions

  • Would this fit with the project’s goals?
  • Should the replacement logic happen during export or somewhere else?

Let me know what you think about this idea.

@m0r4a
Copy link
Author

m0r4a commented Dec 14, 2024

Now that I think about it, you could just create themes, tweak them, and use those instead of making a function to replace colors. This project is really well thought out lol.

I guess I'll wait for some feedback before closing the issue, but I think that could be a really good alternative.

@eylles
Copy link
Owner

eylles commented Dec 15, 2024

I have this problem/nitpick/thingy with the color generation, the "inconsistency" of colors when processing images. For instance:

  • In one image, colors 1, 3, and 5 might form a gradient based on the primary color.
  • In another image, these same colors could be completely unrelated.

I get that this is just how pywal works, but I’ve been thinking about a way to handle this with custom color replacements for specific images.

ah the color mapping, really pywal colorschemes are more geared to have a pseudo grayscale contrast, the colors that tend to contrast and be accent and secondary accent are background, foreground, 0, 15 (color 0 and background aren't always the same tho) color 4 (and 12) (accent) color 2 (and 10) secondary accent.

those are the more or less guaranteed-ish color combinations that will be different enough, that is how dylan built pywal and in pywal16 that doesn't change only that we can get the additional color shades.

Now that I think about it, you could just create themes, tweak them, and use those instead of making a function to replace colors.

yeh that can be done if you want

This project is really well thought out lol.

i'll be honest not very often i read, hear or even think that about pywal.

@CarterSnich
Copy link

Same here. It would be cool if you can re-arrange the generated theme. This is what I got with my wallpaper of choice:
2024-12-15_16-12
Vocaloid-Hatsune-Miku-anime-girls-1954289-wallhere com

I have colors that almost had the same shade, and only 3 or 4 that completely contrasts.

I tried using different backends, and they generated better results. But, the color arrangement doesn't match the context of usage. Like, the prompt is more colored red, and my error and warning texts are more blue.

@eylles
Copy link
Owner

eylles commented Dec 15, 2024

yeh pywal wasn't really designed for keeping the semantic meaning of colors, is more of a looking pretty than being functional in that regard (tho that is a core fundament of ricing that some functionality may be hampered in favour of aesthetics)

image

i personally have forgotten what the semantic meanings of colors were even supposed to mean...

image

image

i'm just used to seeing things as colorful greyscale and relying on the actual error messages and warning symbols instead of on specific colors, tho i know there are some efforts to try and add color semantization to pywal and i would not be opposed to eventually merging that to pywal16 but not as the default behaviour but rather an option as not even the generation of 16 shades of colors is the default on pywal16 even now that the current master can generate the 16 shades for the old built in themes that were just 9 colors (colors 1 to 7 were the same as colors 9 to 15)

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

3 participants