{"record":{"id":"bea95c6415a58e12","repo":"kovidgoyal/kitty","slug":"no-colors-specified","errorCode":null,"errorMessage":"No colors specified","messagePattern":"No colors specified","errorType":"validation","errorClass":"ParsingOfArgsFailed","httpStatus":null,"severity":"error","filePath":"kitty/rc/set_tab_color.py","lineNumber":67,"sourceCode":"the keyword NONE to revert to using the default colors.\n\"\"\"\n    options_spec = (\n        MATCH_TAB_OPTION\n        + \"\"\"\\n\n--self\ntype=bool-set\nClose the tab this command is run in, rather than the active tab.\n\"\"\"\n    )\n    args = RemoteCommand.Args(spec='COLORS', json_field='colors', minimum_count=1, special_parse='parse_tab_colors(args)')\n\n    def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:\n        try:\n            colors = parse_colors(args)\n        except Exception as err:\n            raise ParsingOfArgsFailed(str(err)) from err\n        if not colors:\n            raise ParsingOfArgsFailed('No colors specified')\n        return {'match': opts.match, 'self': opts.self, 'colors': colors}\n\n    def response_from_kitty(self, boss: Boss, window: Window | None, payload_get: PayloadGetType) -> ResponseType:\n        colors = payload_get('colors')\n        s = {k: None if colors[k] is None else int(colors[k]) for k in valid_color_names if k in colors}\n        for tab in self.tabs_for_match_payload(boss, window, payload_get):\n            if tab:\n                for k, v in s.items():\n                    setattr(tab, k, v)\n                tab.mark_tab_bar_dirty()\n        return None\n\n\nset_tab_color = SetTabColor()\n","sourceCodeStart":49,"sourceCodeEnd":82,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/rc/set_tab_color.py#L49-L82","documentation":"set-tab-color requires at least one parsed color spec; if parsing produced an empty dict (no args, or args that map to nothing), ParsingOfArgsFailed is raised.","triggerScenarios":"Running kitten @set-tab-color with no arguments, or with args that parse to an empty color set.","commonSituations":"Scripts conditionally building argument lists that end up empty.","solutions":["Pass at least one color spec, e.g. 'color=red' or 'color=default' to reset","Guard scripts: only invoke when the args list is non-empty"],"exampleFix":"# before\nkitten @set-tab-color\n# after\nkitten @set-tab-color color=#ff0000","handlingStrategy":"validation","validationCode":"assert args and any('=' in a for a in args), 'no color specs given'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Skip the call when the spec list is empty"],"tags":["kitty","cli-args","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}