From de1c6b87272581eec4bfd39771e573c2bb772b60 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 26 Nov 2016 00:36:38 +0900 Subject: [tcell] 24-bit color support TAGS=tcell make install printf "\x1b[38;2;100;200;250mTRUECOLOR\x1b[m\n" | TERM=xterm-truecolor fzf --ansi --- src/tui/tui.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tui/tui.go') diff --git a/src/tui/tui.go b/src/tui/tui.go index 6fcaaa44..125611cf 100644 --- a/src/tui/tui.go +++ b/src/tui/tui.go @@ -93,7 +93,11 @@ const ( doubleClickDuration = 500 * time.Millisecond ) -type Color int16 +type Color int32 + +func (c Color) is24() bool { + return c > 0 && (c&(1<<24)) > 0 +} const ( colUndefined Color = -2 -- cgit v1.2.3