• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Random Color Range

Community Beginner ,
Aug 11, 2012 Aug 11, 2012

Copy link to clipboard

Copied

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.

TOPICS
ActionScript

Views

471

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 12, 2012 Aug 12, 2012

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

Votes

Translate

Translate
Community Expert ,
Aug 12, 2012 Aug 12, 2012

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines