Skip to content

Instantly share code, notes, and snippets.

@thachhoang
Last active December 11, 2015 05:48
Show Gist options
  • Select an option

  • Save thachhoang/4554465 to your computer and use it in GitHub Desktop.

Select an option

Save thachhoang/4554465 to your computer and use it in GitHub Desktop.

Revisions

  1. thachhoang revised this gist Mar 24, 2013. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions gistfile2.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    bg_colour = Math.floor(Math.random()*16777215).toString(16)
    bg_colour = "#"+("000000" + bg_colour).slice(-6)
    document.bgColor = bg_colour

    // Matt Malin (matt@randomcolour.com)
    // http://randomcolour.com
  2. thachhoang created this gist Jan 17, 2013.
    4 changes: 4 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    var color='#'+(Math.random()*0xFFFFFF<<0).toString(16);

    // by nlogax
    // http://paulirish.com/2009/random-hex-color-code-snippets/