It’s not the Traffic Lights

Safari 15, shipped with macOS Monterey, enables changing the color of the browser chrome (if you’re not using Safari 15 on Monterey, see this Youtube video).

Here is the code for this page:


	<meta id="themeColor" name="theme-color" content="">


	var traffic = ['#ED6A5E', '#F4BF4F', '#61C554']

	var delay = 500;
	var current = 0;

	function setHeaderColor(){

		current += 1;
		if (current > 2) current = 0;

		var colorStr = traffic[current];
		themeColor.content = colorStr;

	setInterval(setHeaderColor, delay);

</script><pre id="textBlock" style="font-size:30px;">

  Needs Safari 15


Stack Overflow question.

Leave a Reply

Your email address will not be published. Required fields are marked *