Commit 0ddcde70 authored by Link Mauve's avatar Link Mauve

Merge branch 'check-colors-startup' into 'master'

Check colors on startup and warn

See merge request poezio/poezio!120
parents cf131af4 66cd8e54
......@@ -543,6 +543,12 @@ class Core:
self.information('Welcome to poezio!', 'Info')
if curses.COLORS < 256:
'Your terminal does not appear to support 256 colors, the UI'
' colors will probably be ugly',
if firstrun:
'It seems that it is the first time you start poezio.\n'
......@@ -448,7 +448,7 @@ def to_curses_attr(
colors = color_tuple
bold = False
if curses.COLORS != 256:
if curses.COLORS < 256:
# We are not in a term supporting 256 colors, so we convert
# colors to numbers between -1 and 8
colors = (color_256_to_16(colors[0]), color_256_to_16(colors[1]))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment