Unfortunately I'm not aware of any commonly agreed method to detect 24-bit color support. See https://gist.github.com/XVilka/8346728 and https://lists.gnu.org/archive/html/bug-ncurses/2013-10/msg00007.html for some details. 2016-08-31 0:03 GMT+03:00 Daniel Colascione : > > > On 08/30/2016 01:55 PM, Rami Ylimäki wrote: > >> From: Rami Ylimäki >> >> Based on previous work by Rüdiger Sonderfeld, Christian Hopps and >> Charles Strahan. >> >> Currently it's not possible to detect whether terminal supports 24-bit >> colors. >> > > Why did we decide to stop using terminfo as intended? Why did we stop > supporting terminal capability inspection via control codes? We solved this > problem in the god damn 1980s. Why are we back to specifying terminal > characteristics manually? >