diff --git a/kitty/rc/set_colors.py b/kitty/rc/set_colors.py index 93816a6b54a..a616ceacb3c 100644 --- a/kitty/rc/set_colors.py +++ b/kitty/rc/set_colors.py @@ -89,10 +89,10 @@ def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: Arg def response_from_kitty(self, boss: Boss, window: Optional[Window], payload_get: PayloadGetType) -> ResponseType: from kitty.colors import patch_colors windows = self.windows_for_payload(boss, window, payload_get) - colors: Dict[str, int | None] = payload_get('colors') - tbc = colors.get('transparent_background_colors') + colors: Dict[str, int | None] = payload_get('colors') or {} if payload_get('reset'): colors = {k: None if v is None else int(v) for k, v in boss.color_settings_at_startup.items()} + tbc = colors.get('transparent_background_colors') if tbc: from kitty.options.utils import transparent_background_colors parsed_tbc = transparent_background_colors(str(tbc))