mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Add a remote control command to change colors
Also add a FAQ entry about changing colors in a running kitty instance. I'm tired of all the bug reports asking for this feature. Apparently, people find it hard to google for the existing escape codes based solution.
This commit is contained in:
4
kitty/rgb.py
generated
4
kitty/rgb.py
generated
@@ -31,6 +31,10 @@ def color_from_int(x):
|
||||
return Color((x >> 16) & 255, (x >> 8) & 255, x & 255)
|
||||
|
||||
|
||||
def color_as_int(x):
|
||||
return x.red << 16 | x.green << 8 | x.blue
|
||||
|
||||
|
||||
def to_color(raw, validate=False):
|
||||
# See man XParseColor
|
||||
x = raw.strip().lower()
|
||||
|
||||
Reference in New Issue
Block a user