mirror of https://github.com/aristocratos/bpytop
Merge branch 'fixed-color-in-range-check'
commit
d4a537d0ec
|
@ -1143,9 +1143,9 @@ class Color:
|
||||||
else:
|
else:
|
||||||
raise ValueError(f'RGB dec should be "0-255 0-255 0-255"')
|
raise ValueError(f'RGB dec should be "0-255 0-255 0-255"')
|
||||||
|
|
||||||
ct = self.dec[0] + self.dec[1] + self.dec[2]
|
if not all(0 <= c <= 255 for c in self.dec):
|
||||||
if ct > 255*3 or ct < 0:
|
raise ValueError(f'One or more RGB values are out of range: {color}')
|
||||||
raise ValueError(f'RGB values out of range: {color}')
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errlog.exception(str(e))
|
errlog.exception(str(e))
|
||||||
self.escape = ""
|
self.escape = ""
|
||||||
|
|
Loading…
Reference in New Issue