mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
resolve code quality issues
This commit is contained in:
parent
b31690d71b
commit
3da3c899e4
@ -971,7 +971,7 @@ class Helpers:
|
||||
]
|
||||
return colors[ansi_code - 8]
|
||||
|
||||
elif 16 <= ansi_code <= 231:
|
||||
if 16 <= ansi_code <= 231:
|
||||
# 216 color cube
|
||||
ansi_code -= 16
|
||||
r = (ansi_code // 36) % 6 * 51
|
||||
@ -979,12 +979,11 @@ class Helpers:
|
||||
b = (ansi_code % 6) * 51
|
||||
return (r, g, b)
|
||||
|
||||
elif 232 <= ansi_code <= 255:
|
||||
if 232 <= ansi_code <= 255:
|
||||
# Grayscale colors
|
||||
level = (ansi_code - 232) * 10 + 8
|
||||
return (level, level, level)
|
||||
|
||||
else:
|
||||
return (
|
||||
0,
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user