Hacker News new | ask | show | jobs
by nick0garvey 1351 days ago
Interesting one liner but would like to see the colors it generates
4 comments

If your terminal does 24-bit colour, and your shell is bash or ksh or zsh or close,

    sed -n -e 'y/abcdefOoIi/ABCDEF0011/' -e '/^[A-F01]\{6\}$/p' /usr/share/dict/words | while read c; do printf '\033[38;2;%d;%d;%dm#%s\033[0m\n' $((0x${c:0:2})) $((0x${c:2:2})) $((0x${c:4})) $c; done
View colors here

https://codepen.io/srcreigh/pen/QWrrgdx

Code thanks to gabrielsroka on the Github thread

oh wow, #seabed generated a beautiful blue. what a truly happy accident!
Acacia is green, and fesses (buttocks in French) is pink. Coocoo is the only red in a surrounding of violets, and sobbed is a transparent-y blue like a tear :)
Access is green, acidic is red, and my favourite, cabbie is a nice yellow!
Not long ago I saw a link here to site with the words and the colors...