Developer: How to use a different color for when chat is offline

Signup for a free 18-days trial today

Developer: How to use a different color for when chat is offline

In Knowledge base >

You just need to add another HEX color divided by a slash, like this: #5B94B9/#CFCFCF. The first one (#5B94B9) will be used when the chat is available, and the second one (#CFCFCF) will be used when chat is offline or not available.

Take a look at the example below:

<script type="text/javascript">
	(function(d,c){
		var scrs=d.getElementsByTagName("script");var scr=scrs[scrs.length-1];var e=d.createElement("script");e.async=true;e.src=("https:"==document.location.protocol?"https://":"http://")+"chat.csupporthq.com/external/chat-float-inline.js?"+scrs.length;
		if(typeof c=="function")if(e.addEventListener)e.addEventListener("load",c,false);else if(e.readyState)e.onreadystatechange=function(){if(this.readyState=="loaded")c();};
		scr.parentNode.insertBefore(e,scr);
	})(document,null);
	// Below is the two HEX color codes for online and offline display
	var cs_bgcolor="#5B94B9/#CFCFCF";
</script>

Of course, you can still be more creative and make random colors, or select colors depending on the page.