https://github.com/x8bitrain/meta-theme-sky-color
Js snippet that changes the mobile Chrome nav bar color to the color of the sky based on time of day.
https://github.com/x8bitrain/meta-theme-sky-color
android chrome colors daylight javascript library meta snippet theme-color time
Last synced: 11 months ago
JSON representation
Js snippet that changes the mobile Chrome nav bar color to the color of the sky based on time of day.
- Host: GitHub
- URL: https://github.com/x8bitrain/meta-theme-sky-color
- Owner: x8BitRain
- License: gpl-3.0
- Created: 2019-02-20T10:50:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-03T15:11:43.000Z (over 6 years ago)
- Last Synced: 2025-06-09T23:42:51.751Z (about 1 year ago)
- Topics: android, chrome, colors, daylight, javascript, library, meta, snippet, theme-color, time
- Language: HTML
- Size: 273 KB
- Stars: 19
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README

# meta-theme-sky-color
Js snippet that changes the mobile Chrome nav bar color to the color of the sky based on time of day.
It can be modified to change the color of anything by replacing ```document.querySelector('meta[name="theme-color"]')``` to a div or a css class, etc.
## usage
Insert this
``````
into the ```` of your webpage.
## demo
Visiting https://btr.pm/test on Chrome android/ios will display the following colors in the nav bar.
Or download the example html file in the example folder.
* #9bc5ed between 5am - 6am.
* #94dbf8 between 7am - 8am.
* #87ceeb between 9am - 4pm.
* #ffa365 between 5pm - 6pm.
* #141852 between 7pm - 9pm.
* #000 between 10pm - 4am.
* #26282c as a fallback.
