Colour Chart for Colourised Output with less
The sample code for Bash in Man_page#Using_less_.28Recommended.29 uses a 256 colour palette on some lines.
I followed the existing link to Wikipedia: ANSI escape codes and, though a very good reference, did not suit my needs at the time because there is too much detail.
For someone such as myself who is basically happy with the sample code and wishes only to tweak the colours a little, a simple colour chart would offer a speedier route to gain the knowledge required. I used this colour chart to achieve what I needed: Wkipedia: Xterm 256-color chart.svg
I do not know enough about the various different terminals to know if this is a good enough reference for broader use, however it worked for me using PuTTY to connect to a RaspberryPi.
I would appreciate some instruction if this chart is suitable for broader use. If it is suitable, I would add a link and text along the lines of:
"If you simply wish to change the colours given in the sample code, edit the lines containing
;38;5 and change the number right before
m, referring to the xterm 256-colour chart: Wikipedia: Xterm 256-color chart".
--Crumeniferus (talk) 15:40, 5 January 2015 (UTC)
No search highlighting at current example
I added an example to add search highlighting into LESS_TERMCAP_so. The current example essentially removes highlighting or makes it invisible, which is a major usability issue when searching a keyword from a very large amount of text. The change was reverted Lahwaacz on 09:32, 5 June 2016, referring to "a full example above and detailed explanation at StacExhange". However I had a reason adding it; the current example is inferior in usability, and the information needed to add highlightin was needed to be sourced from three different sources - this page, Stac Exhange and the Wikipedia Page for escape codes, which is a bit daunting and time consuming. I thought the example was usefull.
Maybe the default example(s) should be changed so that they do not remove search highlighting instead, or multiple examples closer to original behaviour added? —This unsigned comment is by Wild Penguin (talk) 13:23, 5 June 2016. Please sign your posts with ~~~~!
- I've reverted an even earlier edit that added the colors with low contrast, now the highlighting is bold-yellow on blue background, which should be always visible enough. For any customizations, you'll indeed need to invest your time into reading the linked resources. -- Lahwaacz (talk) 14:01, 5 June 2016 (UTC)