256 colors with ruby-ncurses
My ruby-ncurses says that I have 256 colors, (the constant Ncurses.COLORS). Using some ruby scripts that use escape sequences, I am able to print 256 colors. Does anyone know how to access these 256 colors using ruby-ncurses?
(I obviously do have xterm-256color and screen-256color working on my system for ruby to say 256).
Using an escape sequence in the print command of a window is printing the escape sequences, whereas using the same escape sequence (taken from Highline, for underline), in *irb* is correctly printing underline in irb.
EDIT: I got a reply from the very helpful maintainer of ncurses (Thomas Dickey) on 256 colors. He says ncurses must be compiled with “ext” option. Also, one can refer to the colors by numbers 1..256. Without recompiling, I wrote a loop and printed colors and saw a few shades of blue. But most other colors looked like they were repeating. I am in no hurry for 256 colors, but thought I would share this.