openproblems-bio / website

Website hosted at https://openproblems.bio
Creative Commons Attribution 4.0 International
3 stars 8 forks source link

demo css dynamic colour palette #210

Open scottgigante-immunai opened 1 year ago

scottgigante-immunai commented 1 year ago

Describe your changes

Issue ticket number and link

Closes #176

Checklist before requesting a review

github-actions[bot] commented 1 year ago

Deploy: success

mxposed commented 1 year ago

Hi Scott, I added simpler selectors, and then I also changed the stroke color rule: I moved var(--bs-dark) to the funkyheatmap call as a parameter, instead of overriding it via css. But maybe I missed something with it that you were targeting specifically

scottgigante-immunai commented 1 year ago

Thanks @mxposed ! This is much cleaner.

scottgigante-immunai commented 1 year ago

@rcannood happy to merge?

rcannood commented 1 year ago

Is this the intended look? How does it work -- does it invert the available palettes?

Screenshot from 2023-04-21 15-53-11

I was really excited to open up this PR and be able to merge it, but looking at I just can't bring myself to saying it's an improvement :P

I still think we simply need two separate palettes, one optimized for a light theme and one optimized for a dark one. I wouldn't invert the palette direction, but rather tone down the brightness (or shift the palette) to work well with a dark theme.

Mind if I make a hard coded example?

KaiWaldrant commented 1 year ago

I agree with @rcannood although it looks a lot better for dark mode it is just not there yet.

scottgigante-immunai commented 1 year ago

This is why I asked for input :) We can tone down the brightness if you like -- you just have to tell me what you want

scottgigante-immunai commented 1 year ago

Another possible alternative -- I just reduced the brightness and left everything else the same. @rcannood @KaiWaldrant @mxposed thoughts? suggestions?

image
KaiWaldrant commented 1 year ago

Looks perfect to me

rcannood commented 1 year ago

I explored a dark color palette here. It uses the original ColorBrewer palettes to shift the palette rather than darkening the existing palettes. I'd propose switching between two different palette sets based on the current theme.

Previous:

Proposal:

@scottgigante-immunai @mxposed Does this look visually appealing to you?