Mobile app version of vmapp.org
Login or Join
Samaraweera207

: How to access the system color scheme from CSS? I would like for the content of a Web page to follow the color scheme of the user's system. For example, if they are using a GTK- or QT-based

@Samaraweera207

Posted in: #Color #Css #Html

I would like for the content of a Web page to follow the color scheme of the user's system. For example, if they are using a GTK- or QT-based Web browser, the background of the Web site would match the color of the background color in GTK or QT applications. Is there a way to set the color scheme of the Web page to match the user's system color scheme?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Samaraweera207

1 Comments

Sorted by latest first Latest Oldest Best

 

@Welton168

Only way to do that is by using deprecated CSS2 color value.

In your example background color would be as follows:

background-color: Background


Here is a full specification from W3.org: www.w3.org/TR/css3-color/#css-system
If you write CSS3 or you want your application to be future-proof you shouldn't use these values. Also note that some of them might be available only on Windows.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme