cpjreynolds / rustty

A terminal UI library
https://docs.rs/rustty
MIT License
152 stars 14 forks source link

16 or 24-bit colour support? #56

Closed darrenburns closed 3 years ago

darrenburns commented 7 years ago

Hi,

Many terminals now support outputting 24 bit colour, but it appears this library is restricted to 8-bit colours. Outputting the raw escape sequence with printline causes the output to be displayed but any whitespaces are massively expanded.

e.g. Passing the following to Terminal::printline: "\x1b[38;2;255;100;0mHELLO WORLD\x1b[0m"

Results in an output that looks a little like (the colours are correct, but spacing is way off):

HELLO                            WORLD

Are there any plans to directly support a wider range of colours, or allow clients to pass in raw escape sequences? Could it be that the escape sequences are already possible but I'm using them incorrectly?

Cheers, Darren