// Verander hieronder de kleuren in je eigen voorkeur.. let op.. er zijn minimaal 3 kleuren nodig var colors=new Array("#FFFF00","#00FFFF","#FF00FF","#CCFFCC","#000000","#FFAA00","#FFFF66","#0000FF","#FFFFFF","#00FF00") // verander hieronder de tijd voor de pause tussen de wisseling var pausebetweencolors=2 // Welk effect wil je // geef "none" in, of "horizontal" of "vertical" var gradient_effect="horizontal" // verander hier de snelheid (hoger is langzamer) var speed=25 // hoe vaak moet het effect zich herhalen // getal tussen de 1 en 9999999 var i_loopmax=500 // verander hieronder niets meer var pausesteps=40 var hexc = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F') var redcol_1 var redcol_2 var redcol_1_b var redcol_2_b var greencol_1 var greencol_2 var greencol_1_b var greencol_2_b var bluecol_1 var bluecol_2 var bluecol_1_b var bluecol_2_b var rgbredfrom var rgbgreenfrom var rgbbluefrom var rgbredto var rgbgreento var rgbblueto var rgbrednow var rgbgreennow var rgbbluenow var rgbredfrom_b var rgbgreenfrom_b var rgbbluefrom_b var rgbredto_b var rgbgreento_b var rgbblueto_b var rgbrednow_b var rgbgreennow_b var rgbbluenow_b var colorhexafrom var colorhexato var i_step=1 var i_loop=0 var i_colorsA=0 var i_colorsB=1 var i_colorsC=1 var i_colorsD=2 pausebetweencolors*=1000 var browserinfos=navigator.userAgent var ie4=document.all&&!document.getElementById var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/) var ns4=document.layers var ns6=document.getElementById&&!document.all var opera=browserinfos.match(/Opera/) var browserok=ie4||ie5||ns4||ns6||opera function translateintorgb() { var hexa=colors[i_colorsA] var hexared=hexa.substring(1,3) var hexagreen=hexa.substring(3,5) var hexablue=hexa.substring(5,7) rgbredfrom=parseInt("0x"+hexared) rgbgreenfrom=parseInt("0x"+hexagreen) rgbbluefrom=parseInt("0x"+hexablue) rgbrednow=rgbredfrom rgbgreennow=rgbgreenfrom rgbbluenow=rgbbluefrom var hexa=colors[i_colorsB] var hexared=hexa.substring(1,3) var hexagreen=hexa.substring(3,5) var hexablue=hexa.substring(5,7) rgbredto=parseInt("0x"+hexared) rgbgreento=parseInt("0x"+hexagreen) rgbblueto=parseInt("0x"+hexablue) var hexa=colors[i_colorsC] var hexared=hexa.substring(1,3) var hexagreen=hexa.substring(3,5) var hexablue=hexa.substring(5,7) rgbredfrom_b=parseInt("0x"+hexared) rgbgreenfrom_b=parseInt("0x"+hexagreen) rgbbluefrom_b=parseInt("0x"+hexablue) rgbrednow_b=rgbredfrom_b rgbgreennow_b=rgbgreenfrom_b rgbbluenow_b=rgbbluefrom_b var hexa=colors[i_colorsD] var hexared=hexa.substring(1,3) var hexagreen=hexa.substring(3,5) var hexablue=hexa.substring(5,7) rgbredto_b=parseInt("0x"+hexared) rgbgreento_b=parseInt("0x"+hexagreen) rgbblueto_b=parseInt("0x"+hexablue) i_colorsA++ i_colorsB++ i_colorsC++ i_colorsD++ if (i_colorsA>=colors.length) {i_colorsA=0} if (i_colorsB>=colors.length) {i_colorsB=0} if (i_colorsC>=colors.length) {i_colorsC=0} if (i_colorsD>=colors.length) {i_colorsD=0} changefromto() } function changefromto() { rgbrednow=rgbrednow-((rgbredfrom-rgbredto)/speed) rgbgreennow=rgbgreennow-((rgbgreenfrom-rgbgreento)/speed) rgbbluenow=rgbbluenow-((rgbbluefrom-rgbblueto)/speed) rgbrednow_b=rgbrednow_b-((rgbredfrom_b-rgbredto_b)/speed) rgbgreennow_b=rgbgreennow_b-((rgbgreenfrom_b-rgbgreento_b)/speed) rgbbluenow_b=rgbbluenow_b-((rgbbluefrom_b-rgbblueto_b)/speed) if (rgbrednow>255) {rgbrednow=255} if (rgbrednow255) {rgbgreennow=255} if (rgbgreennow255) {rgbbluenow=255} if (rgbbluenow255) {rgbrednow_b=255} if (rgbrednow_b255) {rgbgreennow_b=255} if (rgbgreennow_b255) {rgbbluenow_b=255} if (rgbbluenow_b