Add light colors as well for markup

master
joce 3 years ago
parent d6b0039c90
commit 9560670e98
  1. 9
      markup.go
  2. 10
      profile.go

@ -49,6 +49,15 @@ func NewMarkup(profile *Profile) *Markup {
markup.tags[`magenta`] = termbox.ColorMagenta
markup.tags[`cyan`] = termbox.ColorCyan
markup.tags[`white`] = termbox.ColorWhite
markup.tags[`darkgray`] = termbox.ColorDarkGray
markup.tags[`lightred`] = termbox.ColorLightRed
markup.tags[`lightgreen`] = termbox.ColorLightGreen
markup.tags[`lightyellow`] = termbox.ColorLightYellow
markup.tags[`lightblue`] = termbox.ColorLightBlue
markup.tags[`lightmagenta`] = termbox.ColorLightMagenta
markup.tags[`lightcyan`] = termbox.ColorLightCyan
markup.tags[`lightgray`] = termbox.ColorLightGray
markup.tags[`right`] = termbox.ColorDefault // Termbox can combine attributes and a single color using bitwise OR.
markup.tags[`b`] = termbox.AttrBold // Attribute = 1 << (iota + 4)
markup.tags[`u`] = termbox.AttrUnderline

@ -48,7 +48,15 @@ func IsSupportedColor(colorName string) bool {
"blue",
"magenta",
"cyan",
"white":
"white",
"darkgray",
"lightred",
"lightgreen",
"lightyellow",
"lightblue",
"lightmagenta",
"lightcyan",
"lightgray":
return true
}
return false

Loading…
Cancel
Save