Skip to content

Instantly share code, notes, and snippets.

@ream88
Created September 23, 2021 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ream88/2826570503b1d118aea8a5a9fef2d2ec to your computer and use it in GitHub Desktop.
Save ream88/2826570503b1d118aea8a5a9fef2d2ec to your computer and use it in GitHub Desktop.
Drop this into any website to play around with #Safari15 themed tabs!
<meta name="theme-color" content="#29B8FF" />
<input type="color" value="#29B8FF" id="colorPicker" />
<script>
const colorPicker = document.getElementById("colorPicker")
colorPicker.addEventListener("change", function() {
document
.querySelector("meta[name=theme-color]")
.setAttribute("content", colorPicker.value)
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment