Advertisement
metalx1000

BASH Random RGB Hex Color Value

Jan 31st, 2022
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function getColor(){
  4. rgb=$(printf "%02x%02x%02x" $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
  5. echo $rgb
  6. }
  7.  
  8. getColor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement