Copy Link
Add to Bookmark
Report
NULL mag Issue 09 16 256 colors in bash
below is a small bash script on how to use 256 ansi coloring in scripts, perhaps even more. with the rgb function you can choose the color you like and then write any text in that color.
thanx to shinobi for his hint on this ;)
#!/bin/bash
function rgb(){
printf "\x1b[38;2;$1;$2;$3m"
}
rgb 10 200 200
printf "Hello world"