From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- .../html/element%2Fmeta%2Fname%2Ftheme-color.html | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 devdocs/html/element%2Fmeta%2Fname%2Ftheme-color.html (limited to 'devdocs/html/element%2Fmeta%2Fname%2Ftheme-color.html') diff --git a/devdocs/html/element%2Fmeta%2Fname%2Ftheme-color.html b/devdocs/html/element%2Fmeta%2Fname%2Ftheme-color.html new file mode 100644 index 00000000..accdd947 --- /dev/null +++ b/devdocs/html/element%2Fmeta%2Fname%2Ftheme-color.html @@ -0,0 +1,70 @@ +

theme-color

The theme-color value for the name attribute of the <meta> element indicates a suggested color that user agents should use to customize the display of the page or of the surrounding user interface. If specified, the content attribute must contain a valid CSS <color>.

+

Example

+
+
+

html

+
<meta name="theme-color" content="#4285f4" />
+
+

The following image shows the effect that the <meta> element above will have on a document displayed in Chrome running on an Android mobile device.

Image showing the effect of using theme-color

Image credit: from Icons & Browser Colors, created and shared by Google and used according to terms described in the Creative Commons 4.0 Attribution License.

You can provide a media type or query inside the media attribute; the color will then only be set if the media condition is true. For example:

+

html

+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="cyan" />
+<meta name="theme-color" media="(prefers-color-scheme: dark)" content="black" />
+
+
+
+

Specifications

+
+ + +
Specification
HTML Standard
# meta-theme-color
+

Browser compatibility

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebView AndroidChrome AndroidFirefox for AndroidOpera AndroidSafari on IOSSamsung Internet
theme-color +
73Chrome uses the color only on installed progressive web apps.
39–72Chrome reports support, but does not actually use the color anywhere.
+
79Edge uses the color only on installed progressive web apps.
NoNoNo15No
80Chrome for Android does not use the color on devices with native dark mode enabled.
NoNo156.2
+

See also

+
+

+ © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color +

+
-- cgit v1.2.3