mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 09:48:09 +02:00
Allow setting all 256 colors in the config file
This commit is contained in:
4
kitty/rgb.py
generated
4
kitty/rgb.py
generated
@@ -27,6 +27,10 @@ def parse_rgb(spec):
|
||||
return Color(*map(parse_single_color, colors))
|
||||
|
||||
|
||||
def color_from_int(x):
|
||||
return Color((x >> 16) & 255, (x >> 8) & 255, x & 255)
|
||||
|
||||
|
||||
def to_color(raw, validate=False):
|
||||
# See man XParseColor
|
||||
x = raw.strip().lower()
|
||||
|
||||
Reference in New Issue
Block a user