{"record":{"id":"e67a2f3db3bac273","repo":"kovidgoyal/kitty","slug":"no-theme-named-v-found","errorCode":null,"errorMessage":"No theme named %#v found","messagePattern":"No theme named %#v found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kittens/ssh/main.go","lineNumber":612,"sourceCode":"\nfunc change_colors(color_scheme string) (ans string, err error) {\n\tif color_scheme == \"\" {\n\t\treturn\n\t}\n\tvar theme *themes.Theme\n\tif !strings.HasSuffix(color_scheme, \".conf\") {\n\t\tcs := os.ExpandEnv(color_scheme)\n\t\ttc, closer, err := themes.LoadThemes(-1)\n\t\tif err != nil && errors.Is(err, themes.ErrNoCacheFound) {\n\t\t\ttc, closer, err = themes.LoadThemes(time.Hour * 24)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tdefer closer.Close()\n\t\ttheme = tc.ThemeByName(cs)\n\t\tif theme == nil {\n\t\t\treturn \"\", fmt.Errorf(\"No theme named %#v found\", cs)\n\t\t}\n\t} else {\n\t\ttheme, err = themes.ThemeFromFile(utils.ResolveConfPath(color_scheme))\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\tans, err = theme.AsEscapeCodes()\n\tif err == nil {\n\t\tans = \"\\033[#P\" + ans\n\t}\n\treturn\n}\n\nfunc run_ssh(ssh_args, server_args, found_extra_args []string, ssh_config_channel <-chan *SSHConfig) (rc int, err error) {\n\tgo shell_integration.Data()\n\tgo RelevantKittyOpts()\n\tdefer func() {","sourceCodeStart":594,"sourceCodeEnd":630,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/ssh/main.go#L594-L630","documentation":"change_colors resolves the --配色 theme name via the theme collection (ThemeByName) and got nil, meaning no bundled or loaded theme matches the requested name. The kitten then cannot switch kitty's colors over the SSH session.","triggerScenarios":"run_ssh with a color scheme name that is not in the themes collection — misspelled names, custom theme files passed as names instead of paths, or themes not installed in this kitty build.","commonSituations":"Typos like 'Solarized Dark Extra' vs 'Solarized Dark'; referencing a user theme file by bare name; older kitty builds lacking newer bundled themes; theme names differing across kitty versions.","solutions":["List available names: kitty +kitten themes (or check themes.json in the kitty config dir)","Fix the spelling/case to match an installed theme exactly","For custom themes, pass the path to the .conf file (which goes through ThemeFromFile) instead of a name","Update kitty if the theme is a newer bundled one"],"exampleFix":"# before\nkitty +kitten ssh --kitten color-scheme=SolorizedDark user@host\n# after\nkitty +kitten ssh --kitten color-scheme='Solarized Dark' user@host","handlingStrategy":"validation","validationCode":"names, _ := themeNames() // kitty +kitten themes listing\nif !slices.Contains(names, wantTheme) {\n    // fall back to a known-good name or a theme file path\n}","typeGuard":"func isValidTheme(tc *themes.ThemeCollection, name string) bool {\n    return tc.ThemeByName(name) != nil\n}","tryCatchPattern":"if _, err := changeColors(...); err != nil && strings.Contains(err.Error(), \"No theme named\") {\n    // fall back to default theme\n}","preventionTips":["Pin exact theme names from kitty +kitten themes","Prefer theme file paths for custom schemes","Recheck theme names after kitty upgrades"],"tags":["ssh-kitten","theme","configuration"],"backgroundTag":"unknown-theme-name","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}