Rainbow Text - Ash Princess Kawaii
Breaking News
Loading...
23 Januari 2018

Rainbow Text

Januari 23, 2018

Teks gradient rainbow, ini scriptnya.

<script language="javascript">
function createHexArray(r){this.length=r;for(var o=1;o<=r;o++)this[o]=o-1;return this[11]="A",this[12]="B",this[13]="C",this[14]="D",this[15]="E",this[16]="F",this}function convertToHex(r){var o=r/16,t=o+"";t=t.substring(0,2),o=parseInt(t,10);var i=hx[o+1],n=r-16*o;return t=(t=n+"").substring(0,2),n=parseInt(t,10),i+""+hx[n+1]}function makeRainbow(r){for(r=r.substring(3,r.length-4),color_d1=255,mul=color_d1/r.length,i=0;i<r.length;i++)color_d1=255*Math.sin(i/(r.length/3)),color_h1=convertToHex(color_d1),color_d2=mul*i,color_h2=convertToHex(color_d2),document.write('<FONT COLOR="#FF'+color_h1+color_h2+'">'+r.substring(i,i+1)+"</FONT>")}hx=new createHexArray(16);
</script>

<script>
// You may edit the message below  //
   {makeRainbow("<< Jelly liquorice donut brownie. Gingerbread bonbon pastry marshmallow marzipan sweet roll.  >>");}
</script>

DEMONYA:

See the Pen Rainbow Text by Erna Ayuning Nareswari (@ashavenger) on CodePen.

1 Comments: