Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getRgba(){
- const prefix = 'rgba(';
- const suffix = ')';
- let addition = '';
- for(let i=0; i<3; i ++){
- addition += Math.floor(Math.random() * 256);
- addition += ',';
- }
- addition += Math.random();
- return prefix + addition + suffix;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement