Kibibit / kb-better-graph-colors

Replace the history graph colors with a material design color palette.
MIT License
10 stars 0 forks source link

Let's get this merged into core. #2

Open KTibow opened 3 years ago

KTibow commented 3 years ago

Any possibilities of adding this to the original frontend repository? Do you already have a PR pending?

thatkookooguy commented 3 years ago

Hi @KTibow !

Yes. This is very easy to add to core. Right now, I need to hack my way into the component and replace the inner function there that generates the colors.

If I'm adding this to the home assistant core, changing the color will be very fast.

It's just... Will the core team be interested? I guess they chose those colors. No? Do you think the community would prefer my lighter colors?

Thanks!

KTibow commented 3 years ago

Try asking on the discord, I'm not on there but I hear there's some good folks there. The main thing is accessibility, you need to be able to differentiate all of the different colors, and the colors from the background colors.

KTibow commented 3 years ago

I believe they got it from Google Graphs, but I do like yours better.

thatkookooguy commented 3 years ago

I'm working on open a pull request soon to home-assistant/frontend

KTibow commented 3 years ago

Is it done yet? Can you give me a link?

KTibow commented 3 years ago

Are you okay if I do this for you?

noxhirsch commented 3 years ago

Do you think the community would prefer my lighter colors?

I can only speak for myself: I personally like the original colors better. These colors look to pale for my taste. But I'd say that highly depends on the theme you are using. Sidenote: The white text on the lighter colors is not as readable as with the original colors.

KTibow commented 3 years ago

Maybe the existing and new colors can be averaged?

noxhirsch commented 3 years ago

That could be a solution. Something like CSS vars aren't usable here, right? That would be the best solution - to make the graphs themable.

KTibow commented 3 years ago

That's super easy actually! Just change the hex codes to variables with the hex codes as fallbacks.

noxhirsch commented 3 years ago

Even better! Then the best solution would be theme vars + an average of the old and new colors as default. As an alternative theme vars + the old colors as fallback, which might get accepted more likely, because it doesn't change anything. I could imagine theme vars like graph-color-00, graph-color-01 etc

KTibow commented 3 years ago

Sounds good! You can make the PR. In my opinion it should be something like graph-color-red-01, graph-color-green-02, etc. for the theming. Also try posting this on the HA forums with a poll, and see what the community thinks.

noxhirsch commented 3 years ago

Don't you think that would generate some weird names because there are so many different colors? As for instance I picked one color from the list and searched the name: graph-color-faux-caribbean-green-01 Also if I want to change the colors completely in my theme, something like that triggers my OCD 😜 graph-color-red-01: green That's why I'd rather use generic names and let the user deside what color he/she wants to use. I can make the PR, but not unil next week or the week after next (setting everything up in a dev instance, testing and creating the PR takes a lot of time for me as a relative beginner - but my time is very limited at the moment)

KTibow commented 3 years ago

I can do it then. Here I go!

thatkookooguy commented 3 years ago

Nice @KTibow ! beat me to the punch :-)

bcutter commented 1 year ago

Status?

KTibow commented 1 year ago

https://www.home-assistant.io/blog/2022/12/07/release-202212/#shiny-new-state-colors

bcutter commented 1 year ago

https://www.home-assistant.io/blog/2022/12/07/release-202212/#shiny-new-state-colors

So... this frontend integration is useless starting HA Core 2022.12 anyway?

KTibow commented 1 year ago

I suspect the state colors would be new if you have 2022.12, but this integration would override them with its own. But it might not.

bcutter commented 1 year ago

Well, it isn't working anymore anyway (still on HA Core 2022.11). https://github.com/Kibibit/kb-better-graph-colors/issues/9

Sounds like time to say goodbye to this integration. Unfortunately.