Skip to content

Commit 0f644aa

Browse files
committed
lts compat
1 parent 0547e3d commit 0f644aa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/common.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,14 @@ function init_8bit()
252252
nothing
253253
end
254254

255+
get_have_truecolor() =
256+
if isdefined(Base, :get_have_truecolor)
257+
Base.get_have_truecolor()
258+
else
259+
# see gist.github.com/XVilka/8346728#checking-for-colorterm
260+
lowercase(get(ENV, "COLORTERM", "")) ("24bit", "truecolor")
261+
end
262+
255263
# specific to UnicodePlots
256264
forced_24bit() = lowercase(get(ENV, "UP_COLORMODE", "")) ("24", "24bit", "truecolor")
257265
forced_8bit() = lowercase(get(ENV, "UP_COLORMODE", "")) ("8", "8bit")

0 commit comments

Comments
 (0)