To get 256 colors for Emacs running inside your xterm (emacs -nw), follow these instructions:
ncurses-term package installed~/.Xdefaults file: XTerm*termName: xterm-256colorxrdb -merge ~/.Xdefaultsxterm and run emacs -nwTo check how many your terminal is supposed to handle, run tput colors on the command line.
More info available from twb’s Terminal Emulator 256 Color Support page.