Skip navigation
Currently Being Moderated

Random Color Range

Aug 11, 2012 7:35 PM

Hey I need to generate random colors for red and green combos with all tints.  (where it could be solid red or solid green).  Has anyone done this or know of an example code?  thanks.

 
Replies
  • kglad
    72,220 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 12, 2012 10:08 AM   in reply to TheScarecrow

    var col:int=Math.floor(Math.random()*0xff)<< 16 | Math.floor(Math.random()*0xff)<< 8;

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points