You are not logged in.

#1 2016-10-02 15:41:37

rickymcmuffin
Member
Registered: 2016-04-28
Posts: 8

urxvt not showing 256 colors [SOLVED]

I tried to install the solarized theme to my urxvt but it displays a lot of wrong colors. I did a bit of researching and found that it isn't displaying all 256 colors. I ran tput colors and the output is 256. If i put in echo $TERM the output is rxvt-256color. I ran this script

http://www.vim.org/scripts/script.php?script_id=1349

and the output is most colors but not all of them.

Can anyone please help me out?

Last edited by rickymcmuffin (2016-10-03 01:29:51)

Offline

#2 2016-10-02 20:22:18

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: urxvt not showing 256 colors [SOLVED]

Not sure if that's relevant, but my $TERM value in urxvt is `rxvt-unicode-256color`...

-- edit --
Do 256 colours work, though? Try for example:

printf "\033[38;5;148;48;5;100mHello\!\033[0m\n"

Also, could you paste a screenshot of your terminal when it "output most colors but not all of them"?

Last edited by ayekat (2016-10-02 20:23:53)


pkgs │ hacks │ cfg │ blag

Offline

#3 2016-10-03 00:34:21

rickymcmuffin
Member
Registered: 2016-04-28
Posts: 8

Re: urxvt not showing 256 colors [SOLVED]

This is what happens when i run the script:

http://i64.tinypic.com/py5jo.png

When I try:

printf "\033[38;5;148;48;5;100mHello\!\033[0m\n"

It just shows the word Hello/! with a yellow background.

Last edited by jasonwryan (2016-10-03 00:37:58)

Offline

#4 2016-10-03 00:38:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: urxvt not showing 256 colors [SOLVED]

Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2016-10-03 00:44:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: urxvt not showing 256 colors [SOLVED]

The image you posted looks fine to me, in what way does it deviate from what you'd expect?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2016-10-03 01:01:43

rickymcmuffin
Member
Registered: 2016-04-28
Posts: 8

Re: urxvt not showing 256 colors [SOLVED]

If you look closely the colors start at 16 and end at 255 so that means there are 16 colors not being shown and some of the colors in my theme are part of those 16 missing colors.

Offline

#7 2016-10-03 01:16:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: urxvt not showing 256 colors [SOLVED]

That's all that script is supposed to show.  This much shorter script will work much better:

#!/bin/bash

for i in $(seq 0 255); do
        printf "\e[0;48;5;${i}m %03d\e[0;38;5;${i}m %03d " $i $i
        [[ $i -eq 7 || $i -eq 15 || $i -eq 231 || $i -eq 239 || $i -eq 247 ]] && echo
        [[ $i -ge 15 && $i -le 231 && $(( ($i - 15) % 6 )) -eq 0 ]] && echo
done

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2016-10-03 06:42:42

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: urxvt not showing 256 colors [SOLVED]

rickymcmuffin wrote:

If you look closely the colors start at 16 and end at 255 so that means there are 16 colors not being shown and some of the colors in my theme are part of those 16 missing colors.

No, that's fine:

  • Colours 0 to 15 (or more precicely: 0 to 7 and 8 to 15) are the base 8 (or 16) terminal colours: black, red, green, yellow, blue, magenta, cyan, white (normal and bold/bright)

  • Colours 16 to 231 are the 6³ = 216 colour cube that you can see in your output

  • Colours 232 to 255 are the greyscale ramp (black to white) that you can see at the bottom of your output

As a reference, this is my palette.


pkgs │ hacks │ cfg │ blag

Offline

Board footer

Powered by FluxBB