Support truecolor for the terminal stdlib module (#6936)
This commit is contained in:
parent
1b3f640188
commit
7ce38122e8
2 changed files with 202 additions and 14 deletions
25
changelog.md
25
changelog.md
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue