Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 forgot xargs
source | link

bash and utils, 4045 bytes

Inspired (well, stolen from?) @marcosm answer, here is a quite golfed down version (from his 56 bytes down to 4045, shaving the -n 1, and piping toxarg-ing into a printf %s):

shuf -i 0-16777215|printf16777215|xargs printf "\e[48;5;%sm "  # \e is replaced by 1 character, Escape

bash and utils, 40 bytes

Inspired (well, stolen from?) @marcosm answer, here is a quite golfed down version (from his 56 bytes down to 40, shaving the -n 1, and piping to a printf %s):

shuf -i 0-16777215|printf "\e[48;5;%sm "

bash and utils, 45 bytes

Inspired (well, stolen from?) @marcosm answer, here is a quite golfed down version (from his 56 bytes down to 45, shaving the -n 1, and xarg-ing into a printf %s):

shuf -i 0-16777215|xargs printf "\e[48;5;%sm "  # \e is replaced by 1 character, Escape
1
source | link

bash and utils, 40 bytes

Inspired (well, stolen from?) @marcosm answer, here is a quite golfed down version (from his 56 bytes down to 40, shaving the -n 1, and piping to a printf %s):

shuf -i 0-16777215|printf "\e[48;5;%sm "