diff --git a/termenv_unix.go b/termenv_unix.go index 22553e6..4f439c4 100644 --- a/termenv_unix.go +++ b/termenv_unix.go @@ -74,7 +74,7 @@ func backgroundColor() Color { colorFGBG := os.Getenv("COLORFGBG") if strings.Contains(colorFGBG, ";") { c := strings.Split(colorFGBG, ";") - i, err := strconv.Atoi(c[1]) + i, err := strconv.Atoi(c[len(c)-1]) if err == nil { return ANSIColor(i) }