Solved audio/ncmpcpp: getting crazy with colors.

rigoletto@

Developer
Hi!

I am trying to create a custom color theme to my audio/ncmpcpp but I can not figure out its color codes.

If I set "blue" for a given parameter it set the blue what is in my .Xresources, if I set $(blue_black), same but with a black background. Not problem with that.

However, if I set $(34_black), for instance, I get a lighter blue over the black background.

It seems there are 256 possible colors, however I can not figure out the colors <-> numbers relationship.

I tried printing the terminal colors but the numbers/colors does not match with the audio/ncmpcpp ones.

Code:
#!/usr/local/bin/bash
for i in {0..255} ; do
    printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
    if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
        printf "\n";
    fi
done

It is really a stressing me. :mad::mad::mad::mad::mad:

Thank you!
 
Back
Top