What do you mean by 'returns only valid hex values'? Do you need a string of
the number for display, or do you just need the value? For example, if you
don't need the w/alpha format, you can use:
Math.random()*0xFF
Or you can use bitwise shifts and do like:
Math.random()*255<<16 | Math.rando
Can anyone suggest the best way to approach a function to select a random
hex color that returns only valid hex values?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/
2 matches
Mail list logo