Wire up config infrastructure for diff kitten

This commit is contained in:
Kovid Goyal
2018-04-22 21:44:47 +05:30
parent aa18429a8c
commit b5da109e7f
7 changed files with 144 additions and 33 deletions

4
kitty/rgb.py generated
View File

@@ -35,6 +35,10 @@ def color_as_int(x):
return x.red << 16 | x.green << 8 | x.blue
def color_as_sharp(x):
return '#{:02x}{:02x}{:02x}'.format(*x)
def to_color(raw, validate=False):
# See man XParseColor
x = raw.strip().lower()