Support truecolor for the terminal stdlib module (#6936)

This commit is contained in:
Dmitry Atamanov 2018-01-18 20:48:59 +03:00 • committed by Andreas Rumpf
commit 7ce38122e8
2 changed files with 202 additions and 14 deletions

View file

@ -190,6 +190,31 @@ let
- Added support for casting between integers of same bitsize in VM (compile time and nimscript).
This allow to among other things to reinterpret signed integers as unsigned.
- Pragmas now support call syntax, for example: ``{.exportc"myname".}`` and ``{.exportc("myname").}``
- Custom pragmas are now supported using pragma ``pragma``, please see language manual for details
- Added True Color support for some terminals
Example:
```nim
import colors, terminal
const Nim = "Efficient and expressive programming."
var
fg = colYellow
bg = colBlue
int = 1.0
enableTrueColors()
for i in 1..15:
styledEcho bgColor, bg, fgColor, fg, Nim, resetStyle
int -= 0.01
fg = intensity(fg, int)
setForegroundColor colRed
setBackgroundColor colGreen
styledEcho "Red on Green.", resetStyle
```