topical media & game development

talk show tell print

graphic-javascript-effect-background-cube-effect.htm / htm



  
  <!-- TWO STEPS TO INSTALL BASIC COLOR CUBE:
  
    1.  Copy the coding into the HEAD of your HTML document
    2.  Add the last code into the BODY of your HTML document  -->
  
  <!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->
  
  <HEAD>
  
  <SCRIPT LANGUAGE="JavaScript">
  
  <!-- This script and many more are available free online at -->
  <!-- The JavaScript Source!! http://javascript.internet.com -->
  
  <!--//Heres the code for the RGB in paint.
  function rgb(x)
    {
    var value=0;
    var value_array=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");
    var first=x.charAt(0);
    var second=x.charAt(1);
    var a=0;
    var b=0;
    while (value_array[value]!=first)
      {
      value++;
      a=a+16;
      }
    value="0";
    while (value_array[value]!=second)
      {
      value++;
      b++;
      }
    x=a+b;
    return x;
    }
  // end RGB in paint-->
  </script>
  
  <SCRIPT LANGUAGE="JavaScript">
  <!-- Heres the code to type in you own Hexadecimal value
  function changeBack()
    {
    var hex=window.document.f.c.value;
    document.bgColor=hex;
    var hex1=hex.charAt(0);
    if (hex1!="#")
      {
      hex=document.bgColor;
      }
    var red=hex.substring (1,3);
    var rdd=rgb(red);
    document.bb.re.value=rdd;
    var green=hex.substring (3,5);
    var grn=rgb(green);
    document.cc.gr.value=grn;
    var blue=hex.substring (5,7);
    var blue1=rgb(blue);
    document.dd.bl.value=blue1;
    }
  // End own Hexadecimal-->
  </script>
  
  <SCRIPT LANGUAGE="JavaScript">
  <!--Here\'s the code to type in your own RGB
    function changeBackRGB()
    {
    var red=window.document.bb.re.value;
    var green=window.document.cc.gr.value;
    var blue=window.document.dd.bl.value;
    red1=rgb_hex(red);
    green1=rgb_hex(green);
    blue1=rgb_hex(blue);
    var hex="#"+red1+green1+blue1;
    document.bgColor=hex;
    document.f.c.value=hex;
    }
  // End your own RGB-->