Random Light Color Picker

From NAT, 7 Years ago, written in JavaScript, viewed 781 times.
URL https://code.nat.moe/view/63ca1dd6 Embed
Download Paste or View Raw
  1. function getRandomColor() {
  2.                 ranges = [
  3.                     [100,250],
  4.                     [100,170],
  5.                     [200,250]
  6.                 ];
  7.             var g = function() {
  8.                 //select random range and remove
  9.                 var range = ranges.splice(Math.floor(Math.random()*ranges.length), 1)[0];
  10.                 //pick a random number from within the range
  11.                 return Math.floor(Math.random() * (range[1] - range[0])) + range[0];
  12.             }
  13.             return \"rgb(\" + g() + \",\" + g() + \",\" + g() +\")\";
  14.        };

Replies to Random Light Color Picker rss

Title Name Language When
Re: Random Light Color Picker NAT javascript 7 Years ago.

Reply to "Random Light Color Picker"

Here you can reply to the paste above

captcha