gdamore/tcell

Getting value of terminal colors

m-kru opened this issue · 1 comments

Most terminal emulators allow setting colors. There are usually following colors:

  • Primary: background, foreground.
  • Normal: black, blue, cyan, green, magenta, red, white, yellow.
  • Bright: black, blue, cyan, green, magenta, red, white, yellow.

Tcell offers various functions and constants for getting colors. However, it seems like non of them allows for retrieving colors set for the terminal. Am I correct? If so, what is the problem with getting the terminal colors within the tcell?

Ok, I get it. This colors simple have different names. For background and foreground colors simply use ColorDefault. For others use:

	ColorBlack = ColorValid + iota
	ColorMaroon
	ColorGreen
	ColorOlive
	ColorNavy
	ColorPurple
	ColorTeal
	ColorSilver
	ColorGray
	ColorRed
	ColorLime
	ColorYellow
	ColorBlue
	ColorFuchsia
	ColorAqua
	ColorWhite

The naming is different though. The first 8 colors are normal color names. The remaining 8 colors are bright color names.