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

Provide a functionality that inherits background of repo card according to git-hub dark/light mode #777

Closed
Abhijay007 opened this issue Jan 2, 2021 · 7 comments
Labels
stale Issue is marked as stale.

Comments

@Abhijay007
Copy link

Abhijay007 commented Jan 2, 2021

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I want a feature that whenever users switch between GitHub dark-light mode, then the background of the repo card changes accordingly to the mode. Means if a user wants a specific theme in dark or white mode, then whenever he/she switches between modes the theme sets accordingly GitHub mode. In simple words, the repo card's background inherits the background color of the applied mode.

Describe the solution you'd like
one possible solution to this issue is that we can simply set the background color same as the Github's mode's backgrounds by just apply an if statement that when mode = light set the background color to this.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

And the other possible solution is that we can give control to the user that he/she can set a theme according to their preferences in the dark/light mode . for example, I don't want to add any theme (just plain repo card) in light mode but whenever I switch to the dark mode I want the theme to changes to "material-palenight" (theme name)

Idea by screenshots

In light mode of GitHub

light-github

but when I switch mode to dark I need it to be like this

dark-github

@jinliming2
Copy link

You may provide bg_color=00000000 or bg_color=0000 to get a transparent background.

The colour form like #rrggbbaa or #rgba works in Chrome >= 62, Firefox >= 49 or Safari >= 10. See #rrggbbaa hex color notation

I think, maybe it's a good idea to support colour form like bg_color=rgba(0,0,0,0), this is more compatible.

@Abhijay007
Copy link
Author

You may provide bg_color=00000000 or bg_color=0000 to get a transparent background.

The colour form like #rrggbbaa or #rgba works in Chrome >= 62, Firefox >= 49 or Safari >= 10. See #rrggbbaa hex color notation

I think, maybe it's a good idea to support colour form like bg_color=rgba(0,0,0,0), this is more compatible.

Yeah, we can use transparent background, but suppose if someone using black text color, then if he/she switches between modes, then black text makes the problem with the dark mode because black text color is barely visible in dark mode. I think providing functionality to users will be more efficient.

@anuraghazra
Copy link
Owner

it's not possible to detect if users is using dark/light.
If detecting dark/light mode was possible we would have already done it.

Only good way is to use a transparent color background and use text color which looks good on both light/dark mode. see #690

@Abhijay007
Copy link
Author

it's not possible to detect if users is using dark/light.
If detecting dark/light mode was possible we would have already done it.

Only good way is to use a transparent color background and use text color which looks good on both light/dark mode. see #690

ok @anuraghazra sir got it.

But sir, I have one question that, can we able to detect if a user is using dark/white with the background color.
For ex: that if the background-color of the profile is = "#112034" (which is the official color of GitHub dark mode) then change the card background-color to black or the user's desired color.

@anuraghazra
Copy link
Owner

anuraghazra commented Jan 3, 2021

I have one question that, can we able to detect if a user is using dark/white with the background color.

As i said no it's not possible to detect which theme user is using yet

checkout the full discussion for more info: #690

@2br-2b
Copy link

2br-2b commented Jan 29, 2021

Related to #739

@stale
Copy link

stale bot commented Feb 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue is marked as stale.
Projects
None yet
Development

No branches or pull requests

4 participants