slap-editor / slap

Sublime-like terminal-based text editor
MIT License
6.14k stars 216 forks source link

Support 256(or 24bit) Color Schemes #392

Open zadjii opened 7 years ago

zadjii commented 7 years ago

Unless I'm mistaken, there doesn't appear to be a way to use full RGB color (or 256-color) for customizing the appearance. For terminals that support it (most all nowadays), this would allow for even more customization beyond just the 16 ANSI colors.

It looks like the only supported styles now are

; Available styles:
; bold, underline, blink, inverse, invisible, (light)black, (light)red,
; (light)green, (light)yellow, (light)blue, (light)magenta, (light)cyan,
; (light)white

Perhaps {xterm-0-fg} - {xterm-255-bg} for indexing into the 256 color table, or something like {rgb-255,255,255-fg} for full RGB?

dbkaplun commented 7 years ago

You should be able to use 256 colors using hex values: https://github.com/chjj/blessed#colors

The hex values will be coalesced to the closest color that the terminal supports.