{"id":13411787,"url":"https://github.com/rebelot/kanagawa.nvim","last_synced_at":"2025-05-13T18:07:15.376Z","repository":{"id":37436496,"uuid":"440275140","full_name":"rebelot/kanagawa.nvim","owner":"rebelot","description":"NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.","archived":false,"fork":false,"pushed_at":"2025-05-11T14:41:24.000Z","size":4485,"stargazers_count":5102,"open_issues_count":79,"forks_count":198,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-11T15:33:21.517Z","etag":null,"topics":["lsp","lua","neovim","neovim-colorscheme","neovim-theme","nvim","syntax-highlighting","terminal-colors","theme","tree-sitter-highlight"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rebelot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-20T18:51:22.000Z","updated_at":"2025-05-11T14:41:28.000Z","dependencies_parsed_at":"2024-01-03T03:29:35.714Z","dependency_job_id":"c3917ba8-9838-456f-8280-a366a375511c","html_url":"https://github.com/rebelot/kanagawa.nvim","commit_stats":{"total_commits":282,"total_committers":53,"mean_commits":5.320754716981132,"dds":"0.26241134751773054","last_synced_commit":"ad3dddecd606746374ba4807324a08331dfca23c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebelot%2Fkanagawa.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebelot%2Fkanagawa.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebelot%2Fkanagawa.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebelot%2Fkanagawa.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rebelot","download_url":"https://codeload.github.com/rebelot/kanagawa.nvim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000848,"owners_count":21997441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lsp","lua","neovim","neovim-colorscheme","neovim-theme","nvim","syntax-highlighting","terminal-colors","theme","tree-sitter-highlight"],"created_at":"2024-07-30T20:01:16.934Z","updated_at":"2025-05-13T18:07:15.336Z","avatar_url":"https://github.com/rebelot.png","language":"Lua","funding_links":["https://www.paypal.com/donate/?business=VNQPHGW4JEM3S\u0026no_recurring=0\u0026item_name=Buy+me+coffee+and+support+my+work+%3B%29\u0026currency_code=EUR"],"categories":["Colorscheme","Lua","Editors","Color Scheme","Palettes","Colour Schemes"],"sub_categories":["Tree-sitter Supported Colorscheme","Dynamic","Markdown and LaTeX"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch2 align=\"center\"\u003e🌊 KANAGAWA.nvim 🌊\u003c/h2\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"kanagawa@2x.png\" width=\"500\" \u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eNeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ch2 align=\"center\"\u003e\u003cimg alt=\"Preview\" src=\"https://user-images.githubusercontent.com/36300441/222913073-22b95f11-8c08-4b2b-867c-19072c921de1.png\" width=1000\u003e\u003c/h2\u003e\n\u003c/p\u003e\n\n[![W3C](https://img.shields.io/badge/WCAG_2.1_|_AA-756891?logo=w3c\u0026logoColor=fff\u0026style=for-the-badge)](https://www.w3.org/TR/WCAG21/#contrast-minimum)\n\n## Features\n\n- Extensive support for `TreeSitter` syntax highlighting, and _many_ popular plugins\n- Compilation to lua byte code for super fast startup times\n\n## Installation\n\nDownload with your favorite package manager.\n\n```lua\nuse \"rebelot/kanagawa.nvim\"\n```\n\n## Requirements\n\n- neovim latest\n- truecolor terminal support\n- undercurl terminal support (optional)\n\n## Usage\n\nAs simple as writing (pasting)\n\n```vim\ncolorscheme kanagawa\n```\n\n```lua\nvim.cmd(\"colorscheme kanagawa\")\n```\n\n## Configuration\n\nThere is no need to call setup if you are ok with the defaults.\n\n```lua\n-- Default options:\nrequire('kanagawa').setup({\n    compile = false,             -- enable compiling the colorscheme\n    undercurl = true,            -- enable undercurls\n    commentStyle = { italic = true },\n    functionStyle = {},\n    keywordStyle = { italic = true},\n    statementStyle = { bold = true },\n    typeStyle = {},\n    transparent = false,         -- do not set background color\n    dimInactive = false,         -- dim inactive window `:h hl-NormalNC`\n    terminalColors = true,       -- define vim.g.terminal_color_{0,17}\n    colors = {                   -- add/modify theme and palette colors\n        palette = {},\n        theme = { wave = {}, lotus = {}, dragon = {}, all = {} },\n    },\n    overrides = function(colors) -- add/modify highlights\n        return {}\n    end,\n    theme = \"wave\",              -- Load \"wave\" theme\n    background = {               -- map the value of 'background' option to a theme\n        dark = \"wave\",           -- try \"dragon\" !\n        light = \"lotus\"\n    },\n})\n\n-- setup must be called before loading\nvim.cmd(\"colorscheme kanagawa\")\n```\n\n**_NOTE 1:_** If you enable compilation, make sure to run `:KanagawaCompile` command every time you make changes to your config.\n\n```vim\n\" 1. Modify your config\n\" 2. Restart nvim\n\" 3. Run this command:\n:KanagawaCompile\n```\n\n**_NOTE 2:_** Kanagawa adjusts to the value of some options. Make sure that the options `'laststatus'` and `'cmdheight'` are set **_before_** calling `setup`.\n\n## Themes\n\nKanagawa comes in three variants:\n\n- `wave` the default heart-warming theme,\n- `dragon` for those late-night sessions\n- `lotus` for when you're out in the open.\n\nThemes can be changed in three ways:\n\n- Setting `config.theme` to the desired theme.\n- Using the `background` option:\n  Any change to the value of `vim.o.background` will select the theme mapped by `config.background`.\n- Loading the colorscheme directly with:\n\n  ```lua\n  vim.cmd(\"colorscheme kanagawa-wave\")\n  vim.cmd(\"colorscheme kanagawa-dragon\")\n  vim.cmd(\"colorscheme kanagawa-lotus\")\n  ```\n\n  or\n\n  ```lua\n  require(\"kanagawa\").load(\"wave\")\n  ```\n\n## Customization\n\nIn kanagawa, there are _two_ kinds of colors: `PaletteColors` and `ThemeColors`;\n`PaletteColors` are defined directly as RGB Hex strings, and have arbitrary names\nthat recall their actual color. Conversely, `ThemeColors` are named and grouped _semantically_\non the basis of their actual function.\n\nIn short, a `palette` defines all the available colors, while a `theme` maps the `PaletteColors`\nto specific `ThemeColors` and the same palette color may be assigned to multiple theme colors.\n\nYou can change _both_ theme or palette colors using `config.colors`.\nAll the palette color names can be found [here](lua/kanagawa/colors.lua),\nwhile their usage by each theme can be found [here](lua/kanagawa/themes.lua).\n\n```lua\nrequire('kanagawa').setup({\n    ...,\n    colors = {\n        palette = {\n            -- change all usages of these colors\n            sumiInk0 = \"#000000\",\n            fujiWhite = \"#FFFFFF\",\n        },\n        theme = {\n            -- change specific usages for a certain theme, or for all of them\n            wave = {\n                ui = {\n                    float = {\n                        bg = \"none\",\n                    },\n                },\n            },\n            dragon = {\n                syn = {\n                    parameter = \"yellow\",\n                },\n            },\n            all = {\n                ui = {\n                    bg_gutter = \"none\"\n                }\n            }\n        }\n    },\n    ...\n})\n```\n\nYou can also conveniently add/modify any `hlgroups` using the `config.overrides` option, allowing you to customize the looks of specific built-in elements, or any other external plugins that provides `hlgroups`. (See `:help highlight` for more information on `hlgroups`.)\nSupported keywords are the same for `:h nvim_set_hl` `{val}` parameter.\n\n```lua\nrequire('kanagawa').setup({\n    ...,\n    overrides = function(colors)\n        return {\n            -- Assign a static color to strings\n            String = { fg = colors.palette.carpYellow, italic = true },\n            -- theme colors will update dynamically when you change theme!\n            SomePluginHl = { fg = colors.theme.syn.type, bold = true },\n        }\n    end,\n    ...\n})\n```\n\n### Common customizations\n\n#### Remove _gutter_ background\n\nRemove the background of `LineNr`, `{Sign,Fold}Column` and friends\n\n```lua\ncolors = {\n    theme = {\n        all = {\n            ui = {\n                bg_gutter = \"none\"\n            }\n        }\n    }\n}\n```\n\n#### Transparent Floating Windows\n\nThis will make floating windows look nicer with default borders.\n\n```lua\noverrides = function(colors)\n    local theme = colors.theme\n    return {\n        NormalFloat = { bg = \"none\" },\n        FloatBorder = { bg = \"none\" },\n        FloatTitle = { bg = \"none\" },\n\n        -- Save an hlgroup with dark background and dimmed foreground\n        -- so that you can use it where your still want darker windows.\n        -- E.g.: autocmd TermOpen * setlocal winhighlight=Normal:NormalDark\n        NormalDark = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m3 },\n\n        -- Popular plugins that open floats will link to NormalFloat by default;\n        -- set their background accordingly if you wish to keep them dark and borderless\n        LazyNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },\n        MasonNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },\n    }\nend,\n```\n\nIf you'd like to keep the floating windows darker, but you're unhappy with how\nborders are rendered, consider using characters that are drawn at the edges of\nthe box:\n\n```lua\n{ \"🭽\", \"▔\", \"🭾\", \"▕\", \"🭿\", \"▁\", \"🭼\", \"▏\" }\n```\n\n#### Borderless Telescope\n\nBlock-like _modern_ Telescope UI\n\n```lua\noverrides = function(colors)\n    local theme = colors.theme\n    return {\n        TelescopeTitle = { fg = theme.ui.special, bold = true },\n        TelescopePromptNormal = { bg = theme.ui.bg_p1 },\n        TelescopePromptBorder = { fg = theme.ui.bg_p1, bg = theme.ui.bg_p1 },\n        TelescopeResultsNormal = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m1 },\n        TelescopeResultsBorder = { fg = theme.ui.bg_m1, bg = theme.ui.bg_m1 },\n        TelescopePreviewNormal = { bg = theme.ui.bg_dim },\n        TelescopePreviewBorder = { bg = theme.ui.bg_dim, fg = theme.ui.bg_dim },\n    }\nend,\n```\n\n#### Dark completion (popup) menu\n\nMore uniform colors for the popup menu.\n\n```lua\noverrides = function(colors)\n    local theme = colors.theme\n    return {\n        Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1 },  -- add `blend = vim.o.pumblend` to enable transparency\n        PmenuSel = { fg = \"NONE\", bg = theme.ui.bg_p2 },\n        PmenuSbar = { bg = theme.ui.bg_m1 },\n        PmenuThumb = { bg = theme.ui.bg_p2 },\n    }\nend,\n```\n\n#### Tint background of diagnostic messages with their foreground color\n\nThis immitates a style of diagnostic messages seen, for example, in [tokyonight.nvim](https://github.com/folke/tokyonight.nvim).\n\n```lua\noverrides = function(colors)\n  local theme = colors.theme\n  local makeDiagnosticColor = function(color)\n    local c = require(\"kanagawa.lib.color\")\n    return { fg = color, bg = c(color):blend(theme.ui.bg, 0.95):to_hex() }\n  end\n\n  return {\n    DiagnosticVirtualTextHint  = makeDiagnosticColor(theme.diag.hint),\n    DiagnosticVirtualTextInfo  = makeDiagnosticColor(theme.diag.info),\n    DiagnosticVirtualTextWarn  = makeDiagnosticColor(theme.diag.warning),\n    DiagnosticVirtualTextError = makeDiagnosticColor(theme.diag.error),\n  }\nend\n```\n\n## Integration\n\n### Get palette and theme colors\n\n```lua\n-- Get the colors for the current theme\nlocal colors = require(\"kanagawa.colors\").setup()\nlocal palette_colors = colors.palette\nlocal theme_colors = colors.theme\n\n-- Get the colors for a specific theme\nlocal wave_colors = require(\"kanagawa.colors\").setup({ theme = 'wave' })\n```\n\n### Terminal integration\n\nThe following example provides a snippet to automatically change the theme\nfor the Kitty terminal emulator.\n\n```lua\nvim.api.nvim_create_autocmd(\"ColorScheme\", {\n    pattern = \"kanagawa\",\n    callback = function()\n        if vim.o.background == \"light\" then\n            vim.fn.system(\"kitty +kitten themes Kanagawa_light\")\n        elseif vim.o.background == \"dark\" then\n            vim.fn.system(\"kitty +kitten themes Kanagawa_dragon\")\n        else\n            vim.fn.system(\"kitty +kitten themes Kanagawa\")\n        end\n    end,\n})\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch2\u003eColor palette\u003c/h2\u003e\u003c/summary\u003e\n\n|                                                         | Name          |    Hex    | Usage                                                                             |\n| :-----------------------------------------------------: | :------------ | :-------: | :-------------------------------------------------------------------------------- |\n|   \u003cimg src=\"assets/circles/fujiWhite.svg\" width=\"40\"\u003e   | fujiWhite     | `#DCD7BA` | Default foreground                                                                |\n|   \u003cimg src=\"assets/circles/oldWhite.svg\" width=\"40\"\u003e    | oldWhite      | `#C8C093` | Dark foreground (statuslines)                                                     |\n|   \u003cimg src=\"assets/circles/sumiInk0.svg\" width=\"40\"\u003e    | sumiInk0      | `#16161D` | Dark background (statuslines and floating windows)                                |\n|   \u003cimg src=\"assets/circles/sumiInk1.svg\" width=\"40\"\u003e    | sumiInk1      | `#1F1F28` | Default background                                                                |\n|   \u003cimg src=\"assets/circles/sumiInk2.svg\" width=\"40\"\u003e    | sumiInk2      | `#2A2A37` | Lighter background (colorcolumn, folds)                                           |\n|   \u003cimg src=\"assets/circles/sumiInk3.svg\" width=\"40\"\u003e    | sumiInk3      | `#363646` | Lighter background (cursorline)                                                   |\n|   \u003cimg src=\"assets/circles/sumiInk4.svg\" width=\"40\"\u003e    | sumiInk4      | `#54546D` | Darker foreground (line numbers, fold column, non-text characters), float borders |\n|   \u003cimg src=\"assets/circles/waveBlue1.svg\" width=\"40\"\u003e   | waveBlue1     | `#223249` | Popup background, visual selection background                                     |\n|   \u003cimg src=\"assets/circles/waveBlue2.svg\" width=\"40\"\u003e   | waveBlue2     | `#2D4F67` | Popup selection background, search background                                     |\n|  \u003cimg src=\"assets/circles/winterGreen.svg\" width=\"40\"\u003e  | winterGreen   | `#2B3328` | Diff Add (background)                                                             |\n| \u003cimg src=\"assets/circles/winterYellow.svg\" width=\"40\"\u003e  | winterYellow  | `#49443C` | Diff Change (background)                                                          |\n|   \u003cimg src=\"assets/circles/winterRed.svg\" width=\"40\"\u003e   | winterRed     | `#43242B` | Diff Deleted (background)                                                         |\n|  \u003cimg src=\"assets/circles/winterBlue.svg\" width=\"40\"\u003e   | winterBlue    | `#252535` | Diff Line (background)                                                            |\n|  \u003cimg src=\"assets/circles/autumnGreen.svg\" width=\"40\"\u003e  | autumnGreen   | `#76946A` | Git Add                                                                           |\n|   \u003cimg src=\"assets/circles/autumnRed.svg\" width=\"40\"\u003e   | autumnRed     | `#C34043` | Git Delete                                                                        |\n| \u003cimg src=\"assets/circles/autumnYellow.svg\" width=\"40\"\u003e  | autumnYellow  | `#DCA561` | Git Change                                                                        |\n|  \u003cimg src=\"assets/circles/samuraiRed.svg\" width=\"40\"\u003e   | samuraiRed    | `#E82424` | Diagnostic Error                                                                  |\n|  \u003cimg src=\"assets/circles/roninYellow.svg\" width=\"40\"\u003e  | roninYellow   | `#FF9E3B` | Diagnostic Warning                                                                |\n|   \u003cimg src=\"assets/circles/waveAqua1.svg\" width=\"40\"\u003e   | waveAqua1     | `#6A9589` | Diagnostic Info                                                                   |\n|  \u003cimg src=\"assets/circles/dragonBlue.svg\" width=\"40\"\u003e   | dragonBlue    | `#658594` | Diagnostic Hint                                                                   |\n|   \u003cimg src=\"assets/circles/fujiGray.svg\" width=\"40\"\u003e    | fujiGray      | `#727169` | Comments                                                                          |\n| \u003cimg src=\"assets/circles/springViolet1.svg\" width=\"40\"\u003e | springViolet1 | `#938AA9` | Light foreground                                                                  |\n|   \u003cimg src=\"assets/circles/oniViolet.svg\" width=\"40\"\u003e   | oniViolet     | `#957FB8` | Statements and Keywords                                                           |\n|  \u003cimg src=\"assets/circles/crystalBlue.svg\" width=\"40\"\u003e  | crystalBlue   | `#7E9CD8` | Functions and Titles                                                              |\n| \u003cimg src=\"assets/circles/springViolet2.svg\" width=\"40\"\u003e | springViolet2 | `#9CABCA` | Brackets and punctuation                                                          |\n|  \u003cimg src=\"assets/circles/springBlue.svg\" width=\"40\"\u003e   | springBlue    | `#7FB4CA` | Specials and builtin functions                                                    |\n|   \u003cimg src=\"assets/circles/lightBlue.svg\" width=\"40\"\u003e   | lightBlue     | `#A3D4D5` | Not used                                                                          |\n|   \u003cimg src=\"assets/circles/waveAqua2.svg\" width=\"40\"\u003e   | waveAqua2     | `#7AA89F` | Types                                                                             |\n|  \u003cimg src=\"assets/circles/springGreen.svg\" width=\"40\"\u003e  | springGreen   | `#98BB6C` | Strings                                                                           |\n|  \u003cimg src=\"assets/circles/boatYellow1.svg\" width=\"40\"\u003e  | boatYellow1   | `#938056` | Not used                                                                          |\n|  \u003cimg src=\"assets/circles/boatYellow2.svg\" width=\"40\"\u003e  | boatYellow2   | `#C0A36E` | Operators, RegEx                                                                  |\n|  \u003cimg src=\"assets/circles/carpYellow.svg\" width=\"40\"\u003e   | carpYellow    | `#E6C384` | Identifiers                                                                       |\n|  \u003cimg src=\"assets/circles/sakuraPink.svg\" width=\"40\"\u003e   | sakuraPink    | `#D27E99` | Numbers                                                                           |\n|    \u003cimg src=\"assets/circles/waveRed.svg\" width=\"40\"\u003e    | waveRed       | `#E46876` | Standout specials 1 (builtin variables)                                           |\n|   \u003cimg src=\"assets/circles/peachRed.svg\" width=\"40\"\u003e    | peachRed      | `#FF5D62` | Standout specials 2 (exception handling, return)                                  |\n| \u003cimg src=\"assets/circles/surimiOrange.svg\" width=\"40\"\u003e  | surimiOrange  | `#FFA066` | Constants, imports, booleans                                                      |\n|  \u003cimg src=\"assets/circles/katanaGray.svg\" width=\"40\"\u003e   | katanaGray    | `#717C7C` | Deprecated                                                                        |\n\n\u003c/details\u003e\n\n## Accessibility\n\nThe colors maintain a `4.5:1` contrast ratio, complying with [WCAG 2.1 | Level AA](https://www.w3.org/TR/WCAG21/#contrast-minimum).\n\n## Extras\n\n- [Alacritty](extras/alacritty/)\n- [Alfred](extras/alfred.md)\n- [Base16](extras/base16/)\n- [Broot](extras/broot/)\n- [Emacs](extras/emacs/)\n- [Fish](extras/fish/)\n- [Foot](extras/foot/)\n- [iTerm](extras/iterm/)\n- [Kitty](extras/kitty/)\n- [Mintty](extras/mintty/)\n- [Pywal](extras/pywal/)\n- [Sway](extras/sway/)\n- [Wezterm](extras/wezterm/)\n- [Windows Terminal](extras/windows_terminal/)\n- [Ghostty](extras/ghostty)\n- [Xresources](extras/xresources/)\n- [tmTheme (Sublime Text, bat and delta)](extras/textmate/)\n- [JSON compatible with many terminals](extras/gogh/) Check [Gogh](https://github.com/Gogh-Co/Gogh#-terminals) for the list of supported terminals.\n- 🎉 Bonus! You win a tiny [python script](palette.py)🐍 to extract color palettes 🎨 from any image! 🥳\n\n## Acknowledgements\n\n- [Tokyonight](https://github.com/folke/tokyonight.nvim)\n- [Gruvbox](https://github.com/morhetz/gruvbox)\n- [Catppuccin](https://github.com/catppuccin/nvim)\n- [Affinity Designer](https://affinity.serif.com/designer/)\n\n### Donate\n\nBuy me coffee and support my work ;)\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?business=VNQPHGW4JEM3S\u0026no_recurring=0\u0026item_name=Buy+me+coffee+and+support+my+work+%3B%29\u0026currency_code=EUR)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebelot%2Fkanagawa.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frebelot%2Fkanagawa.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebelot%2Fkanagawa.nvim/lists"}