Gorgias logo
Gorgias logo

All articles

Replace the background gradientUpdated a month ago

This suggestion isn't an official feature of our Chat widget, so our support for it is limited - we recommend that it be implemented by someone with a technical background.


The following custom script should be added to your theme.liquid above the </body> tag if you want the Chat design to be in one color only, without the gradient. 

Replace #xxxxx in the script with your HEX color code.

1<script>
2 var initGorgiasChatPromise = (window.GorgiasChat) ? window.GorgiasChat.init() : new Promise(function (resolve) { window.addEventListener('gorgias-widget-loaded', function () { resolve(); }) });
3
4 initGorgiasChatPromise.then(async () => {
5 GorgiasChat.on('widget:opened', function () {
6 const chatWindow = document.querySelector('#chat-window')?.contentWindow.document.querySelector('.frame-content').firstChild.firstChild
7 chatWindow.style.background = '#xxxxxx';
8 })
9 })
10</script>
Was this article helpful?
Yes
No