I was surprised to see there aren't any 256colors scripts installable from the CPAN. I have one I've been using locally for awhile, so I turned it into a proper module and uploaded it as App::256colors (first!).

Compared to the many other 256colors scripts floating around the internet, this one will print 256 color codes in both integer and hex/rgb format, which can be useful depending on what you're tweaking (e.g. Xdefaults vs PS1). I also think the output format is pretty nice (although I may be biased :) )

Based on the size of your terminal it will wrap the column output accordingly, as well as invoke the less pager with suitable options if the terminal is too small to display all the codes.

It's a pretty simple script, but I've found it invaluable for getting my color schemes "just right."

Screenshot:

https://metacpan.org/pod/distribution/App-256colors/bin/256colors https://github.com/calid/app-256colors