Command for detecting whether the system is using a dark or light desktop theme?
2
votes
2
answers
1782
views
There's [a way in browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) to query if the user prefers a dark or light theme so that a website developer could adapt the website's colours according to user preference.
Is there also a way to detect that on the command line? Is there a command that outputs
light
or dark
(or some equivalent boolean-valued output indicating light or dark?)
Asked by Peeyush Kushwaha
(586 rep)
May 4, 2022, 06:10 PM
Last activity: Oct 15, 2023, 07:56 AM
Last activity: Oct 15, 2023, 07:56 AM