Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
2.3k stars 89 forks source link

Kolorette / kustom support #387

Open russianspy1234 opened 8 months ago

russianspy1234 commented 8 months ago

Is your feature request related to a problem? Please describe. There is currently no option to set only some colors dynamically

Describe the solution you'd like Implementing kustom support so I could set certain colors to be picked from the background while others are static

Use case I like to have the main background be amoled black for battery saving and better looks while other colors are dynamic

Describe alternatives you've considered Tried using the new dynamic colors but certain wallpapers end up ugly.

Additional context Using androids built in dynamic colors would work too, if there was a way to set only certain colors to be dynamic

BlackyHawky commented 7 months ago

@Helium314: I worked on this commit yesterday; can I add the desired functionality as described above?

Helium314 commented 7 months ago

How do you plan to do it? I have no idea what "Kolorette / kustom" is, and what is necessary to support it.

BlackyHawky commented 7 months ago

I don't know what "Kolorette / kustom" means either, but I assumed that the desired functionality was to choose dynamic colors for certain elements of the user theme, while the colors of other elements would be other user-defined colors.

To achieve this, I've added a neutral button to the color picker dialog, which only appears for Android versions 12 and above.

Details of the changes are in commit 5932357.

Watch video
https://github.com/Helium314/openboard/assets/139015663/e974f97c-294b-45b9-98ed-bc0b9b9dfa07

@russianspy1234 Is that what you're asking?

russianspy1234 commented 7 months ago

I don't know what "Kolorette / kustom" means either, but I assumed that the desired functionality was to choose dynamic colors for certain elements of the user theme, while the colors of other elements would be other user-defined colors.

To achieve this, I've added a neutral button to the color picker dialog, which only appears for Android versions 12 and above.

Details of the changes are in commit 5932357. Watch video

@russianspy1234 Is that what you're asking?

Kustom is the category for apps like KWGT and KLWP. It uses code for certain things. Kolorette is an app that automatically pulls the colors from your wallpaper and make them available to other apps that know what to do with it, for example $br(kolorette,W_PROMINENT_BODY)$ would be the most prominent color in the wallpaper. It's admittedly more niche since Material You became widely supported but I prefer it due to it's versatility and actually using the exact color rather than material versions of each color the way Google does it. That said, I know I'm in the minority. Your solution is great and likely better for way more people so thank you for putting it in.

BlackyHawky commented 7 months ago

So my modification has nothing to do with your request 🤣🤣 In any case, I don't know the application you mention at all.

Your solution is great and likely better for way more people so thank you for putting it in.

@Helium314 What should I do ? Should I still make a PR about my change or cancel everything?

russianspy1234 commented 7 months ago

So my modification has nothing to do with your request 🤣🤣 In any case, I don't know the application you mention at all.

Your solution is great and likely better for way more people so thank you for putting it in.

@Helium314 What should I do ? Should I still make a PR about my change or cancel everything?

It solves the core problem I'm having, and I did mention it as a possibility in Additional Context section so I'd love if you make the commit. More people would probably use this than would use my idea.

Helium314 commented 7 months ago

@BlackyHawky as far as I understand this only sets the current color, so the chosen color will not change when the dynamic colors change?

BlackyHawky commented 7 months ago

...so the chosen color will not change when the dynamic colors change?

That's exactly right 👍

Helium314 commented 7 months ago

@russianspy1234 is this what you expect, or did you expect the colors to adjust when dynamic colors change?

russianspy1234 commented 7 months ago

@russianspy1234 is this what you expect, or did you expect the colors to adjust when dynamic colors change?

I'm not sure I am reading it right. What I would like is if one could choose Dynamic Colors as the main option but then override certain options with a specific color, or vice versa where one can choose User Defined but then have an option to choose some of the colors dynamically, with said colors changing automatically if the wallpaper changes.

BlackyHawky commented 7 months ago

@russianspy1234 You answered Helium's question correctly. However, with my modification, the dynamic color doesn't change if the wallpaper or the android system color palette color is modified; this is only done manually.

russianspy1234 commented 7 months ago

@russianspy1234 You answered Helium's question correctly. However, with my modification, the dynamic color doesn't change if the wallpaper or the android system color palette color is modified; this is only done manually.

Ah dang. I have an automated wallpaper changer and was hoping to get my keyboard to automatically theme to it partially. Guess that's more reason to try to get tasker support added in

BlackyHawky commented 7 months ago

@russianspy1234 don't worry: if the keyboard color changes automatically when the device switches to night mode, then it's possible to do the same for what you're asking for. However, I don't think the modification will be as simple as the one I made.

@Helium314 BTW, there's a big bug that's not caused by my modification: if you change colors in the custom colors, all the icons disappear. I don't know how long this has been going on. I'll open a commit if necessary.

See screenshot