Skip to content
← Back to Community
How to make rgb text
Profile icon
dylanlovestocode

I want the Socket text to be rgb. Just send me code and where to put it. Thanks!

Voters
Profile icon
RonaB
Profile icon
2nde19MEZIANE
Profile icon
GieorghiiMaksim
Profile icon
hardianto-cpu
Profile icon
XdekHaker
Profile icon
GOONER0404
Profile icon
TofunmiAshaolu
Profile icon
AepSAEPULOH1
Profile icon
joch8580Dark123
Profile icon
JulianaGar1234562022
Comments
hotnewtop
Profile icon
IntellectualGuy

Use the chalk package.

Profile icon
themining72

setInterval(() => {document.getElementById("Title").style.color = "#" + Math.floor(Math.random()*16777215).toString(16);}, 50);

Put this in anywhere in html/script.js. You may adjust the flashing speed by editing the 50 in the final parts of the code, the smaller the faster but may stop for a few seconds from lag.

Profile icon
dylanlovestocode
Profile icon
themining72

@indigiz Uhh I think your site is currently broken but the script loaded before the Title element, so it's trying to make it rgb before the element existed. You could try to remove <script src = "script.js"></script> (Line 8, html/index.html) from the head and put it in body just above </body> (Line 43, html/index.html), or alternatively (possibly better) replace the previous code I gave you with:

window.addEventListener('load', function () { setInterval(() => {document.getElementById("Title").style.color = "#" + Math.floor(Math.random()*16777215).toString(16);}, 50); })

in html/script.js or maybe try the answer by the other person.