├── .github └── workflows │ └── assign.yml ├── LICENSE ├── README.md ├── autoload └── lightline │ └── colorscheme │ └── momiji.vim ├── color.go ├── colors ├── momiji.vim └── momiji.vim.tmpl ├── go.mod ├── iterm └── momiji.itermcolors ├── lua ├── momiji.lua ├── momiji.lua.tmpl └── momiji_test.lua ├── main.go ├── momiji-colors.png ├── momiji-lightline.png ├── momiji-lightline.psd ├── momiji.png ├── palette.go ├── vim.go └── wezterm ├── momiji.toml └── momiji.toml.tmpl /.github/workflows/assign.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json 2 | 3 | name: Issue assignment 4 | on: 5 | issues: 6 | types: [opened] 7 | jobs: 8 | auto-assign: 9 | runs-on: ubuntu-latest 10 | permissions: 11 | issues: write 12 | steps: 13 | - name: 'Auto-assign issue' 14 | uses: pozil/auto-assign-issue@v1 15 | with: 16 | assignees: kyoh86 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 kyoh86 for all codes. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | 12 | All Rights Reserved for the Branding Image (https://raw.githubusercontent.com/kyoh86/momiji/main/momiji.png) 13 | 14 | Copyright (c) 2023 Kakeru Kuroda for image 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | Momiji branding image by Kakeru Kuroda. All Rights for the image is Reserved. 3 | 4 | # 🍁 momiji 5 | 6 | My color scheme for vim/iTerm2, "momiji" that means Japanese "autumn leaves"🍂. 7 | 8 | ANSI Colors 9 | 10 | ## install (vim) 11 | 12 | By [vim-plug](https://github.com/junegunn/vim-plug): 13 | 14 | ``` 15 | Plug 'kyoh86/momiji', { 'rtp': 'vim' } 16 | ``` 17 | 18 | ### lightline 19 | 20 | `momiji` supports [lightline](https://github.com/itchyny/lightline.vim) colors. 21 | 22 | ``` 23 | let g:lightline.colorscheme = 'momiji' 24 | ``` 25 | 26 | lightline 27 | 28 | ## install (slack) 29 | 30 | `#140C0C,#372A2A,#DA5774,#E6E3E3,#348C4E,#E6E3E3,#89B7E1,#A55AAA,#372A2A,#E6E3E3` 31 | 32 | Post this line in your message, and click "Switch sidebar theme" 33 | -------------------------------------------------------------------------------- /autoload/lightline/colorscheme/momiji.vim: -------------------------------------------------------------------------------- 1 | " ----------------------------------------------------------------------------- 2 | " File: momiji.vim 3 | " Description: Momiji colorscheme for Brightline (itchyny/lightline.vim) 4 | " Author: kyoh86 5 | " ----------------------------------------------------------------------------- 6 | 7 | function! s:getSrcColor(group) 8 | let guiColor = synIDattr(hlID(a:group), "fg", "gui") 9 | let termColor = synIDattr(hlID(a:group), "fg", "cterm") 10 | return [ guiColor, termColor ] 11 | endfunction 12 | 13 | if exists('g:lightline') 14 | let s:black = g:momiji_palette.black 15 | let s:brightwhite = g:momiji_palette.brightwhite 16 | let s:brightblack = g:momiji_palette.brightblack 17 | let s:white = g:momiji_palette.white 18 | let s:yellow = g:momiji_palette.yellow 19 | let s:brightyellow = g:momiji_palette.brightyellow 20 | let s:blue = g:momiji_palette.blue 21 | let s:brightblue = g:momiji_palette.brightblue 22 | let s:cyan = g:momiji_palette.cyan 23 | let s:brightcyan = g:momiji_palette.brightcyan 24 | let s:red = g:momiji_palette.red 25 | let s:brightred = g:momiji_palette.brightred 26 | let s:magenta = g:momiji_palette.magenta 27 | let s:brightmagenta = g:momiji_palette.brightmagenta 28 | let s:green = g:momiji_palette.green 29 | let s:brightgreen = g:momiji_palette.brightgreen 30 | let s:gradation1 = g:momiji_palette.gradation1 31 | let s:gradation2 = g:momiji_palette.gradation2 32 | let s:gradation3 = g:momiji_palette.gradation3 33 | let s:gradation4 = g:momiji_palette.gradation4 34 | let s:gradation5 = g:momiji_palette.gradation5 35 | 36 | let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}} 37 | let s:p.normal.left = [ [ s:black, s:green ], [ s:black, s:brightgreen ] ] 38 | let s:p.normal.right = [ [ s:black, s:green ], [ s:black, s:brightgreen ] ] 39 | let s:p.normal.middle = [ [ s:brightgreen, s:brightblack ] ] 40 | 41 | let s:p.inactive.right = [ [ s:white, s:brightblack ], [ s:white, s:brightblack ] ] 42 | let s:p.inactive.left = [ [ s:white, s:brightblack ], [ s:white, s:brightblack ] ] 43 | let s:p.inactive.middle = [ [ s:gradation5, s:brightblack ] ] 44 | 45 | let s:p.insert.left = [ [ s:black, s:blue ], [ s:black, s:brightblue ] ] 46 | let s:p.insert.right = [ [ s:black, s:blue ], [ s:black, s:brightblue ] ] 47 | let s:p.insert.middle = [ [ s:brightblue, s:brightblack ] ] 48 | 49 | let s:p.replace.left = [ [ s:black, s:magenta ], [ s:black, s:brightmagenta ] ] 50 | let s:p.replace.right = [ [ s:black, s:magenta ], [ s:black, s:brightmagenta ] ] 51 | let s:p.replace.middle = [ [ s:brightmagenta, s:brightblack ] ] 52 | 53 | let s:p.visual.left = [ [ s:black, s:yellow ], [ s:black, s:brightyellow ] ] 54 | let s:p.visual.right = [ [ s:black, s:yellow ], [ s:black, s:brightyellow ] ] 55 | let s:p.visual.middle = [ [ s:brightyellow, s:brightblack ] ] 56 | 57 | let s:p.tabline.left = [ [ s:brightwhite, s:brightblack ] ] 58 | let s:p.tabline.tabsel = [ [ s:black, s:white ] ] 59 | let s:p.tabline.middle = [ [ s:black, s:brightblack ] ] 60 | let s:p.tabline.right = [ [ s:black, s:brightwhite ] ] 61 | 62 | let s:p.normal.error = [ [ s:brightwhite, s:red ] ] 63 | let s:p.normal.warning = [ [ s:black, s:yellow ] ] 64 | 65 | let g:lightline#colorscheme#momiji#palette = lightline#colorscheme#flatten(s:p) 66 | endif 67 | -------------------------------------------------------------------------------- /color.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "image/color" 6 | ) 7 | 8 | type Color struct { 9 | RGBA color.RGBA 10 | Index uint8 11 | } 12 | 13 | // ToHex forms rrggbb 14 | func (c Color) ToHex() string { 15 | return fmt.Sprintf("%02x%02x%02x", c.RGBA.R, c.RGBA.G, c.RGBA.B) 16 | } 17 | 18 | // ToRGBFunc forms rgb(255, 255, 255) 19 | func (c Color) ToRGBFunc() string { 20 | return fmt.Sprintf("rgb(%d,%d,%d)", c.RGBA.R, c.RGBA.G, c.RGBA.B) 21 | } 22 | 23 | // FromHex converts rrggbb to color.RGBA 24 | func FromHex(hex string) (v color.RGBA) { 25 | _, err := fmt.Sscanf(hex, "%02x%02x%02x", &v.R, &v.G, &v.B) 26 | if err != nil { 27 | panic(err) 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /colors/momiji.vim: -------------------------------------------------------------------------------- 1 | " 'momiji.vim' -- Vim color scheme. 2 | " Maintainer: kyoh86 (me@kyoh86.dev) 3 | " Description: Colorscheme that focus ease of use and clearly defined contrasting colors with a slightly earthy tone. 4 | " Original Source: https://github.com/kyoh86/momiji 5 | 6 | highlight clear 7 | if exists("syntax_on") 8 | syntax reset 9 | endif 10 | 11 | let g:colors_name='momiji' 12 | 13 | if !has('gui_running') && &t_Co != 256 14 | finish 15 | endif 16 | 17 | let g:momiji_colors = {} 18 | let g:momiji_colors['black'] = '#140c0c' 19 | let g:momiji_colors['red'] = '#da5774' 20 | let g:momiji_colors['green'] = '#348c4e' 21 | let g:momiji_colors['yellow'] = '#e7a82b' 22 | let g:momiji_colors['blue'] = '#4884d2' 23 | let g:momiji_colors['magenta'] = '#a55aaa' 24 | let g:momiji_colors['cyan'] = '#1f90a8' 25 | let g:momiji_colors['white'] = '#a09999' 26 | let g:momiji_colors['brightblack'] = '#5a4e4e' 27 | let g:momiji_colors['brightred'] = '#f5875b' 28 | let g:momiji_colors['brightgreen'] = '#9abe86' 29 | let g:momiji_colors['brightyellow'] = '#ffd791' 30 | let g:momiji_colors['brightblue'] = '#89b7e1' 31 | let g:momiji_colors['brightmagenta'] = '#eea1d1' 32 | let g:momiji_colors['brightcyan'] = '#69b2ac' 33 | let g:momiji_colors['brightwhite'] = '#e6e3e3' 34 | let g:momiji_colors['gradation1'] = '#372a2a' 35 | let g:momiji_colors['gradation2'] = '#5a4e4e' 36 | let g:momiji_colors['gradation3'] = '#7d7373' 37 | let g:momiji_colors['gradation4'] = '#a09999' 38 | let g:momiji_colors['gradation5'] = '#c3bebe' 39 | 40 | let g:momiji_palette = {} 41 | let g:momiji_palette['black'] = [g:momiji_colors.black, 0] 42 | let g:momiji_palette['red'] = [g:momiji_colors.red, 1] 43 | let g:momiji_palette['green'] = [g:momiji_colors.green, 2] 44 | let g:momiji_palette['yellow'] = [g:momiji_colors.yellow, 3] 45 | let g:momiji_palette['blue'] = [g:momiji_colors.blue, 4] 46 | let g:momiji_palette['magenta'] = [g:momiji_colors.magenta, 5] 47 | let g:momiji_palette['cyan'] = [g:momiji_colors.cyan, 6] 48 | let g:momiji_palette['white'] = [g:momiji_colors.white, 7] 49 | let g:momiji_palette['brightblack'] = [g:momiji_colors.brightblack, 8] 50 | let g:momiji_palette['brightred'] = [g:momiji_colors.brightred, 9] 51 | let g:momiji_palette['brightgreen'] = [g:momiji_colors.brightgreen, 10] 52 | let g:momiji_palette['brightyellow'] = [g:momiji_colors.brightyellow, 11] 53 | let g:momiji_palette['brightblue'] = [g:momiji_colors.brightblue, 12] 54 | let g:momiji_palette['brightmagenta'] = [g:momiji_colors.brightmagenta, 13] 55 | let g:momiji_palette['brightcyan'] = [g:momiji_colors.brightcyan, 14] 56 | let g:momiji_palette['brightwhite'] = [g:momiji_colors.brightwhite, 15] 57 | let g:momiji_palette['gradation1'] = [g:momiji_colors.gradation1, 235] 58 | let g:momiji_palette['gradation2'] = [g:momiji_colors.gradation2, 236] 59 | let g:momiji_palette['gradation3'] = [g:momiji_colors.gradation3, 237] 60 | let g:momiji_palette['gradation4'] = [g:momiji_colors.gradation4, 238] 61 | let g:momiji_palette['gradation5'] = [g:momiji_colors.gradation5, 239] 62 | 63 | " Momiji Hi Groups: 64 | " memoize common hi groups 65 | highlight MomijiWhite guifg=#a09999 ctermfg=7 66 | highlight MomijiRed guifg=#da5774 ctermfg=1 67 | highlight MomijiGreen guifg=#348c4e ctermfg=2 68 | highlight MomijiYellow guifg=#e7a82b ctermfg=3 69 | highlight MomijiBlue guifg=#4884d2 ctermfg=4 70 | highlight MomijiMagenta guifg=#a55aaa ctermfg=5 71 | highlight MomijiCyan guifg=#1f90a8 ctermfg=6 72 | highlight MomijiBlack guifg=#140c0c ctermfg=0 73 | highlight MomijiRedBold guifg=#da5774 ctermfg=1 gui=bold cterm=bold 74 | highlight MomijiGreenBold guifg=#348c4e ctermfg=2 gui=bold cterm=bold 75 | highlight MomijiYellowBold guifg=#e7a82b ctermfg=3 gui=bold cterm=bold 76 | highlight MomijiBlueBold guifg=#4884d2 ctermfg=4 gui=bold cterm=bold 77 | highlight MomijiMagentaBold guifg=#a55aaa ctermfg=5 gui=bold cterm=bold 78 | highlight MomijiCyanBold guifg=#1f90a8 ctermfg=6 gui=bold cterm=bold 79 | 80 | highlight MomijiBrightRed guifg=#f5875b ctermfg=9 81 | highlight MomijiBrightGreen guifg=#9abe86 ctermfg=10 82 | highlight MomijiBrightYellow guifg=#ffd791 ctermfg=11 83 | highlight MomijiBrightBlue guifg=#89b7e1 ctermfg=12 84 | highlight MomijiBrightMagenta guifg=#eea1d1 ctermfg=13 85 | highlight MomijiBrightCyan guifg=#69b2ac ctermfg=14 86 | highlight MomijiBrightBlack guifg=#5a4e4e ctermfg=8 87 | highlight MomijiBrightWhite guifg=#e6e3e3 ctermfg=15 88 | 89 | " special 90 | highlight MomijiBrightRedBold guifg=#f5875b ctermfg=9 gui=bold cterm=bold 91 | highlight MomijiGradation1 guifg=#372a2a ctermfg=235 92 | highlight MomijiGradation2 guifg=#5a4e4e ctermfg=236 93 | highlight MomijiGradation3 guifg=#7d7373 ctermfg=237 94 | highlight MomijiGradation4 guifg=#a09999 ctermfg=238 95 | highlight MomijiGradation5 guifg=#c3bebe ctermfg=239 96 | 97 | " General UI: 98 | " Normal text 99 | highlight Normal guifg=#e6e3e3 ctermfg=15 guibg=#140c0c ctermbg=0 100 | highlight NormalFloat guifg=#e6e3e3 ctermfg=15 guibg=#372a2a ctermbg=235 101 | 102 | " Screen line that the cursor is 103 | highlight! CursorLine NONE 104 | highlight CursorLine guibg=#372a2a ctermbg=235 105 | " Screen column that the cursor is 106 | highlight CursorColumn guibg=#5a4e4e ctermbg=236 107 | 108 | " Tab pages line filler 109 | highlight TabLineFill guifg=#348c4e ctermfg=2 guibg=#140c0c ctermbg=0 110 | " Active tab page label 111 | highlight TabLineSel guifg=#da5774 ctermfg=1 guibg=#140c0c ctermbg=0 gui=bold cterm=bold 112 | " Not active tab page label 113 | highlight! link TabLine TabLineFill 114 | 115 | " Match paired bracket under the cursor 116 | highlight MatchParen guifg=#140c0c ctermfg=0 guibg=#89b7e1 ctermbg=12 gui=bold cterm=bold 117 | 118 | " Highlighted screen columns 119 | highlight ColorColumn guibg=#5a4e4e ctermbg=236 120 | 121 | " Concealed element: \lambda → λ 122 | highlight Conceal guifg=#4884d2 ctermfg=4 123 | 124 | highlight! Delimiter guifg=#e6e3e3 ctermfg=15 125 | 126 | highlight! NonText guifg=#5a4e4e ctermfg=236 127 | highlight! SpecialKey guifg=#5a4e4e ctermfg=236 128 | highlight! Whitespace guifg=#5a4e4e ctermfg=236 129 | 130 | highlight Visual guifg=#140c0c ctermfg=0 guibg=#e7a82b ctermbg=3 131 | highlight! link VisualNOS Visual 132 | 133 | highlight Search guifg=#140c0c ctermfg=0 guibg=#89b7e1 ctermbg=12 134 | highlight IncSearch None 135 | highlight IncSearch guifg=#140c0c ctermfg=0 guibg=#eea1d1 ctermbg=13 136 | highlight CurSearch None 137 | highlight CurSearch guifg=#140c0c ctermfg=0 guibg=#9abe86 ctermbg=10 138 | highlight Substitute None 139 | highlight Substitute guifg=#140c0c ctermfg=0 guibg=#eea1d1 ctermbg=13 140 | 141 | highlight Underlined guifg=#4884d2 ctermfg=4 gui=underline cterm=underline 142 | 143 | highlight StatusLine guifg=#e6e3e3 ctermfg=15 guibg=#5a4e4e ctermbg=236 gui=bold cterm=bold 144 | highlight StatusLineNC guifg=#e6e3e3 ctermfg=15 guibg=#372a2a ctermbg=235 gui=underline cterm=underline 145 | 146 | " The column separating vertically split windows 147 | highlight VertSplit guifg=#a09999 ctermfg=238 gui=bold cterm=bold 148 | 149 | " Current match in wildmenu completion 150 | highlight WildMenu guifg=#4884d2 ctermfg=4 guibg=#140c0c ctermbg=0 gui=bold cterm=bold 151 | 152 | " Directory names, special names in listing 153 | highlight! Directory guifg=#348c4e ctermfg=2 gui=bold cterm=bold 154 | 155 | " Titles for output from :set all, :autocmd, etc. 156 | highlight! Title guifg=#e7a82b ctermfg=3 gui=bold cterm=bold 157 | 158 | " Error messages on the command line 159 | highlight ErrorMsg guifg=#e6e3e3 ctermfg=15 guibg=#da5774 ctermbg=1 160 | " More prompt: -- More -- 161 | highlight! MoreMsg guifg=#e7a82b ctermfg=3 gui=bold cterm=bold 162 | " Current mode message: -- INSERT -- 163 | highlight! ModeMsg guifg=#e7a82b ctermfg=3 gui=bold cterm=bold 164 | " 'Press enter' prompt and yes/no questions 165 | highlight! Question guifg=#f5875b ctermfg=9 gui=bold cterm=bold 166 | " Warning messages 167 | highlight! WarningMsg guifg=#da5774 ctermfg=1 gui=bold cterm=bold 168 | " Gutter: 169 | " Line number for :number and :# commands 170 | highlight LineNr guifg=#a09999 ctermfg=238 guibg=#372a2a ctermbg=235 171 | 172 | " Line number of CursorLine 173 | highlight CursorLineNr guifg=#140c0c ctermfg=0 guibg=#4884d2 ctermbg=4 gui=bold cterm=bold 174 | 175 | if hlexists('LineNrAbove') 176 | highlight LineNrAbove guifg=#eea1d1 ctermfg=13 guibg=#372a2a ctermbg=235 177 | highlight LineNrBelow guifg=#9abe86 ctermfg=10 guibg=#372a2a ctermbg=235 178 | endif 179 | 180 | " Column where signs are displayed 181 | highlight SignColumn guibg=#372a2a ctermbg=235 182 | 183 | " Line used for closed folds 184 | highlight Folded guifg=#a09999 ctermfg=238 gui=italic cterm=italic 185 | " Column where folds are displayed 186 | highlight FoldColumn guifg=#a09999 ctermfg=238 guibg=#140c0c ctermbg=0 187 | " Cursor: 188 | " Character under cursor 189 | highlight Cursor guifg=#140c0c ctermfg=0 guibg=#ffd791 ctermbg=11 190 | " Character under cursor in a focused terminal 191 | highlight link TermCursor Cursor 192 | " Cursor in an unfocused terminal 193 | highlight link TermCursorNC Cursor 194 | " Visual mode cursor, selection 195 | highlight link vCursor Cursor 196 | " Input moder cursor 197 | highlight! link iCursor Cursor 198 | " Language mapping cursor 199 | highlight! link lCursor Cursor 200 | " Syntax Highlighting: 201 | highlight! Special guifg=#ffd791 ctermfg=11 gui=bold cterm=bold 202 | 203 | highlight Comment guifg=#7d7373 ctermfg=237 gui=italic cterm=italic 204 | highlight Todo guifg=#e6e3e3 ctermfg=15 gui=bold,italic cterm=bold,italic 205 | highlight Error guifg=#f5875b ctermfg=9 gui=bold,inverse cterm=bold,inverse 206 | 207 | " String constant: "this is a string" 208 | highlight String guifg=#348c4e ctermfg=2 209 | 210 | " Generic statement 211 | highlight! Statement guifg=#e7a82b ctermfg=3 212 | " if, then, else, endif, swicth, etc. 213 | highlight! Conditional guifg=#e7a82b ctermfg=3 214 | " for, do, while, etc. 215 | highlight! Repeat guifg=#e7a82b ctermfg=3 216 | " case, default, etc. 217 | highlight! Label guifg=#e7a82b ctermfg=3 218 | " try, catch, throw 219 | highlight! Exception guifg=#da5774 ctermfg=1 220 | " sizeof, "+", "*", etc. 221 | highlight! link Operator None 222 | " Any other keyword 223 | highlight! Keyword guifg=#da5774 ctermfg=1 224 | 225 | " Variable name 226 | highlight! Identifier guifg=#89b7e1 ctermfg=12 227 | " Function name 228 | highlight! Function guifg=#4884d2 ctermfg=4 229 | 230 | " Generic preprocessor 231 | highlight! PreProc guifg=#a55aaa ctermfg=5 232 | " Preprocessor #include 233 | highlight! Include guifg=#a55aaa ctermfg=5 234 | " Preprocessor #define 235 | highlight! Define guifg=#a55aaa ctermfg=5 236 | " Same as Define 237 | highlight! Macro guifg=#a55aaa ctermfg=5 238 | " Preprocessor #if, #else, #endif, etc. 239 | highlight! PreCondit guifg=#a55aaa ctermfg=5 240 | 241 | " Generic constant 242 | highlight! Constant guifg=#eea1d1 ctermfg=13 243 | " Character constant: 'c', '/n' 244 | highlight! Character guifg=#eea1d1 ctermfg=13 245 | " Boolean constant: TRUE, false 246 | highlight! Boolean guifg=#eea1d1 ctermfg=13 247 | " Number constant: 234, 0xff 248 | highlight! Number guifg=#eea1d1 ctermfg=13 249 | " Floating point constant: 2.3e10 250 | highlight! Float guifg=#eea1d1 ctermfg=13 251 | 252 | " Generic type 253 | highlight! Type guifg=#1f90a8 ctermfg=6 254 | " static, register, volatile, etc 255 | highlight! StorageClass guifg=#1f90a8 ctermfg=6 256 | " struct, union, enum, etc. 257 | highlight! Structure guifg=#f5875b ctermfg=9 258 | " typedef 259 | highlight! Typedef guifg=#f5875b ctermfg=9 260 | " Completion Menu: 261 | " Popup menu: normal item 262 | highlight Pmenu guibg=#372a2a ctermbg=235 263 | " Popup menu: selected item 264 | highlight PmenuSel guibg=#5a4e4e ctermbg=236 gui=bold cterm=bold 265 | " Popup menu: scrollbar 266 | highlight PmenuSbar guibg=#5a4e4e ctermbg=236 267 | " Popup menu: scrollbar thumb 268 | highlight PmenuThumb guibg=#5a4e4e ctermbg=236 269 | " Quickfix 270 | highlight QuickFixLine guifg=#1f90a8 ctermfg=6 gui=bold cterm=bold 271 | " Diffs: 272 | highlight DiffDelete guifg=#f5875b ctermfg=9 guibg=#140c0c ctermbg=0 273 | highlight DiffAdd guifg=#9abe86 ctermfg=10 guibg=#140c0c ctermbg=0 274 | highlight DiffChange guifg=#1f90a8 ctermfg=6 guibg=#140c0c ctermbg=0 275 | highlight DiffText guifg=#ffd791 ctermfg=11 guibg=#140c0c ctermbg=0 276 | highlight! link Added DiffAdd 277 | highlight! link Changed DiffChange 278 | highlight! link Removed DiffDelete 279 | " Spelling: 280 | if has("spell") 281 | " Not capitalised word, or compile warnings 282 | highlight SpellCap gui=undercurl cterm=undercurl guisp=#4884d2 283 | " Not recognized word 284 | highlight SpellBad gui=undercurl cterm=undercurl guisp=#4884d2 285 | " Wrong spelling for selected region 286 | highlight SpellLocal gui=undercurl cterm=undercurl guisp=#1f90a8 287 | " Rare word 288 | highlight SpellRare gui=undercurl cterm=undercurl guisp=#a55aaa 289 | endif 290 | 291 | if hlexists('FloatBorder') 292 | highlight FloatBorder None 293 | highlight FloatBorder guifg=#a09999 ctermfg=238 gui=bold cterm=bold 294 | highlight FloatShadow None 295 | highlight FloatShadow guibg=#372a2a ctermbg=235 296 | endif 297 | 298 | if hlexists('DiagnosticInfo') 299 | highlight DiagnosticDeprecated cterm=strikethrough gui=strikethrough guisp=Red 300 | highlight DiagnosticOk guifg=#9abe86 ctermfg=10 301 | highlight DiagnosticHint guifg=#7d7373 ctermfg=237 302 | highlight DiagnosticInfo guifg=#89b7e1 ctermfg=12 303 | highlight DiagnosticWarn guifg=#f5875b ctermfg=9 304 | highlight DiagnosticError guifg=#da5774 ctermfg=1 305 | highlight DiagnosticUnderlineOk gui=underline cterm=underline guisp=#9abe86 306 | highlight DiagnosticUnderlineHint gui=underline cterm=underline guisp=#7d7373 307 | highlight DiagnosticUnderlineInfo gui=underline cterm=underline guisp=#89b7e1 308 | highlight DiagnosticUnderlineWarn gui=underline cterm=underline guisp=#f5875b 309 | highlight DiagnosticUnderlineError gui=underline cterm=underline guisp=#da5774 310 | endif 311 | 312 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: 313 | -------------------------------------------------------------------------------- /colors/momiji.vim.tmpl: -------------------------------------------------------------------------------- 1 | " 'momiji.vim' -- Vim color scheme. 2 | " Maintainer: kyoh86 (me@kyoh86.dev) 3 | " Description: Colorscheme that focus ease of use and clearly defined contrasting colors with a slightly earthy tone. 4 | " Original Source: https://github.com/kyoh86/momiji 5 | 6 | highlight clear 7 | if exists("syntax_on") 8 | syntax reset 9 | endif 10 | 11 | let g:colors_name='momiji' 12 | 13 | if !has('gui_running') && &t_Co != 256 14 | finish 15 | endif 16 | 17 | let g:momiji_colors = {} 18 | let g:momiji_colors['black'] = '#{{.Black.ToHex}}' 19 | let g:momiji_colors['red'] = '#{{.Red.ToHex}}' 20 | let g:momiji_colors['green'] = '#{{.Green.ToHex}}' 21 | let g:momiji_colors['yellow'] = '#{{.Yellow.ToHex}}' 22 | let g:momiji_colors['blue'] = '#{{.Blue.ToHex}}' 23 | let g:momiji_colors['magenta'] = '#{{.Magenta.ToHex}}' 24 | let g:momiji_colors['cyan'] = '#{{.Cyan.ToHex}}' 25 | let g:momiji_colors['white'] = '#{{.White.ToHex}}' 26 | let g:momiji_colors['brightblack'] = '#{{.BrightBlack.ToHex}}' 27 | let g:momiji_colors['brightred'] = '#{{.BrightRed.ToHex}}' 28 | let g:momiji_colors['brightgreen'] = '#{{.BrightGreen.ToHex}}' 29 | let g:momiji_colors['brightyellow'] = '#{{.BrightYellow.ToHex}}' 30 | let g:momiji_colors['brightblue'] = '#{{.BrightBlue.ToHex}}' 31 | let g:momiji_colors['brightmagenta'] = '#{{.BrightMagenta.ToHex}}' 32 | let g:momiji_colors['brightcyan'] = '#{{.BrightCyan.ToHex}}' 33 | let g:momiji_colors['brightwhite'] = '#{{.BrightWhite.ToHex}}' 34 | let g:momiji_colors['gradation1'] = '#{{.Gradation1.ToHex}}' 35 | let g:momiji_colors['gradation2'] = '#{{.Gradation2.ToHex}}' 36 | let g:momiji_colors['gradation3'] = '#{{.Gradation3.ToHex}}' 37 | let g:momiji_colors['gradation4'] = '#{{.Gradation4.ToHex}}' 38 | let g:momiji_colors['gradation5'] = '#{{.Gradation5.ToHex}}' 39 | 40 | let g:momiji_palette = {} 41 | let g:momiji_palette['black'] = [g:momiji_colors.black, {{.Black.Index}}] 42 | let g:momiji_palette['red'] = [g:momiji_colors.red, {{.Red.Index}}] 43 | let g:momiji_palette['green'] = [g:momiji_colors.green, {{.Green.Index}}] 44 | let g:momiji_palette['yellow'] = [g:momiji_colors.yellow, {{.Yellow.Index}}] 45 | let g:momiji_palette['blue'] = [g:momiji_colors.blue, {{.Blue.Index}}] 46 | let g:momiji_palette['magenta'] = [g:momiji_colors.magenta, {{.Magenta.Index}}] 47 | let g:momiji_palette['cyan'] = [g:momiji_colors.cyan, {{.Cyan.Index}}] 48 | let g:momiji_palette['white'] = [g:momiji_colors.white, {{.White.Index}}] 49 | let g:momiji_palette['brightblack'] = [g:momiji_colors.brightblack, {{.BrightBlack.Index}}] 50 | let g:momiji_palette['brightred'] = [g:momiji_colors.brightred, {{.BrightRed.Index}}] 51 | let g:momiji_palette['brightgreen'] = [g:momiji_colors.brightgreen, {{.BrightGreen.Index}}] 52 | let g:momiji_palette['brightyellow'] = [g:momiji_colors.brightyellow, {{.BrightYellow.Index}}] 53 | let g:momiji_palette['brightblue'] = [g:momiji_colors.brightblue, {{.BrightBlue.Index}}] 54 | let g:momiji_palette['brightmagenta'] = [g:momiji_colors.brightmagenta, {{.BrightMagenta.Index}}] 55 | let g:momiji_palette['brightcyan'] = [g:momiji_colors.brightcyan, {{.BrightCyan.Index}}] 56 | let g:momiji_palette['brightwhite'] = [g:momiji_colors.brightwhite, {{.BrightWhite.Index}}] 57 | let g:momiji_palette['gradation1'] = [g:momiji_colors.gradation1, {{.Gradation1.Index}}] 58 | let g:momiji_palette['gradation2'] = [g:momiji_colors.gradation2, {{.Gradation2.Index}}] 59 | let g:momiji_palette['gradation3'] = [g:momiji_colors.gradation3, {{.Gradation3.Index}}] 60 | let g:momiji_palette['gradation4'] = [g:momiji_colors.gradation4, {{.Gradation4.Index}}] 61 | let g:momiji_palette['gradation5'] = [g:momiji_colors.gradation5, {{.Gradation5.Index}}] 62 | 63 | " Momiji Hi Groups: 64 | " memoize common hi groups 65 | highlight MomijiWhite {{Foreground .White}} 66 | highlight MomijiRed {{Foreground .Red}} 67 | highlight MomijiGreen {{Foreground .Green}} 68 | highlight MomijiYellow {{Foreground .Yellow}} 69 | highlight MomijiBlue {{Foreground .Blue}} 70 | highlight MomijiMagenta {{Foreground .Magenta}} 71 | highlight MomijiCyan {{Foreground .Cyan}} 72 | highlight MomijiBlack {{Foreground .Black}} 73 | highlight MomijiRedBold {{Foreground .Red}} {{Emphasis "bold"}} 74 | highlight MomijiGreenBold {{Foreground .Green}} {{Emphasis "bold"}} 75 | highlight MomijiYellowBold {{Foreground .Yellow}} {{Emphasis "bold"}} 76 | highlight MomijiBlueBold {{Foreground .Blue}} {{Emphasis "bold"}} 77 | highlight MomijiMagentaBold {{Foreground .Magenta}} {{Emphasis "bold"}} 78 | highlight MomijiCyanBold {{Foreground .Cyan}} {{Emphasis "bold"}} 79 | 80 | highlight MomijiBrightRed {{Foreground .BrightRed}} 81 | highlight MomijiBrightGreen {{Foreground .BrightGreen}} 82 | highlight MomijiBrightYellow {{Foreground .BrightYellow}} 83 | highlight MomijiBrightBlue {{Foreground .BrightBlue}} 84 | highlight MomijiBrightMagenta {{Foreground .BrightMagenta}} 85 | highlight MomijiBrightCyan {{Foreground .BrightCyan}} 86 | highlight MomijiBrightBlack {{Foreground .BrightBlack}} 87 | highlight MomijiBrightWhite {{Foreground .BrightWhite}} 88 | 89 | " special 90 | highlight MomijiBrightRedBold {{Foreground .BrightRed}} {{Emphasis "bold"}} 91 | highlight MomijiGradation1 {{Foreground .Gradation1}} 92 | highlight MomijiGradation2 {{Foreground .Gradation2}} 93 | highlight MomijiGradation3 {{Foreground .Gradation3}} 94 | highlight MomijiGradation4 {{Foreground .Gradation4}} 95 | highlight MomijiGradation5 {{Foreground .Gradation5}} 96 | 97 | " General UI: 98 | " Normal text 99 | highlight Normal {{Foreground .Foreground}} {{Background .Background}} 100 | highlight NormalFloat {{Foreground .Foreground}} {{Background .Gradation1}} 101 | 102 | " Screen line that the cursor is 103 | highlight! CursorLine NONE 104 | highlight CursorLine {{Background .Gradation1}} 105 | " Screen column that the cursor is 106 | highlight CursorColumn {{Background .Gradation2}} 107 | 108 | " Tab pages line filler 109 | highlight TabLineFill {{Foreground .Green}} {{Background .Background}} 110 | " Active tab page label 111 | highlight TabLineSel {{Foreground .Red}} {{Background .Background}} {{Emphasis "bold"}} 112 | " Not active tab page label 113 | highlight! link TabLine TabLineFill 114 | 115 | " Match paired bracket under the cursor 116 | highlight MatchParen {{Foreground .Black}} {{Background .BrightBlue}} {{Emphasis "bold"}} 117 | 118 | " Highlighted screen columns 119 | highlight ColorColumn {{Background .Gradation2}} 120 | 121 | " Concealed element: \lambda → λ 122 | highlight Conceal {{Foreground .Blue}} 123 | 124 | highlight! Delimiter {{Foreground .Foreground}} 125 | 126 | highlight! NonText {{Foreground .Gradation2}} 127 | highlight! SpecialKey {{Foreground .Gradation2}} 128 | highlight! Whitespace {{Foreground .Gradation2}} 129 | 130 | highlight Visual {{Foreground .Background}} {{Background .Yellow}} 131 | highlight! link VisualNOS Visual 132 | 133 | highlight Search {{Foreground .Background}} {{Background .BrightBlue}} 134 | highlight IncSearch None 135 | highlight IncSearch {{Foreground .Background}} {{Background .BrightMagenta}} 136 | highlight CurSearch None 137 | highlight CurSearch {{Foreground .Background}} {{Background .BrightGreen}} 138 | highlight Substitute None 139 | highlight Substitute {{Foreground .Background}} {{Background .BrightMagenta}} 140 | 141 | highlight Underlined {{Foreground .Blue}} {{Emphasis "underline"}} 142 | 143 | highlight StatusLine {{Foreground .Foreground}} {{Background .Gradation2}} {{Emphasis "bold"}} 144 | highlight StatusLineNC {{Foreground .Foreground}} {{Background .Gradation1}} {{Emphasis "underline"}} 145 | 146 | " The column separating vertically split windows 147 | highlight VertSplit {{Foreground .Gradation4}} {{Emphasis "bold"}} 148 | 149 | " Current match in wildmenu completion 150 | highlight WildMenu {{Foreground .Blue}} {{Background .Background}} {{Emphasis "bold"}} 151 | 152 | " Directory names, special names in listing 153 | highlight! Directory {{Foreground .Green}} {{Emphasis "bold"}} 154 | 155 | " Titles for output from :set all, :autocmd, etc. 156 | highlight! Title {{Foreground .Yellow}} {{Emphasis "bold"}} 157 | 158 | " Error messages on the command line 159 | highlight ErrorMsg {{Foreground .Foreground}} {{Background .Red}} 160 | " More prompt: -- More -- 161 | highlight! MoreMsg {{Foreground .Yellow}} {{Emphasis "bold"}} 162 | " Current mode message: -- INSERT -- 163 | highlight! ModeMsg {{Foreground .Yellow}} {{Emphasis "bold"}} 164 | " 'Press enter' prompt and yes/no questions 165 | highlight! Question {{Foreground .BrightRed}} {{Emphasis "bold"}} 166 | " Warning messages 167 | highlight! WarningMsg {{Foreground .Red}} {{Emphasis "bold"}} 168 | " Gutter: 169 | " Line number for :number and :# commands 170 | highlight LineNr {{Foreground .Gradation4}} {{Background .Gradation1}} 171 | 172 | " Line number of CursorLine 173 | highlight CursorLineNr {{Foreground .Background}} {{Background .Blue}} {{Emphasis "bold"}} 174 | 175 | if hlexists('LineNrAbove') 176 | highlight LineNrAbove {{Foreground .StrongMagenta}} {{Background .Gradation1}} 177 | highlight LineNrBelow {{Foreground .StrongGreen}} {{Background .Gradation1}} 178 | endif 179 | 180 | " Column where signs are displayed 181 | highlight SignColumn {{Background .Gradation1}} 182 | 183 | " Line used for closed folds 184 | highlight Folded {{Foreground .Gradation4}} {{Emphasis "italic"}} 185 | " Column where folds are displayed 186 | highlight FoldColumn {{Foreground .Gradation4}} {{Background .Background}} 187 | " Cursor: 188 | " Character under cursor 189 | highlight Cursor {{Foreground .Background}} {{Background .StrongYellow}} 190 | " Character under cursor in a focused terminal 191 | highlight link TermCursor Cursor 192 | " Cursor in an unfocused terminal 193 | highlight link TermCursorNC Cursor 194 | " Visual mode cursor, selection 195 | highlight link vCursor Cursor 196 | " Input moder cursor 197 | highlight! link iCursor Cursor 198 | " Language mapping cursor 199 | highlight! link lCursor Cursor 200 | " Syntax Highlighting: 201 | highlight! Special {{Foreground .StrongYellow}} {{Emphasis "bold"}} 202 | 203 | highlight Comment {{Foreground .Gradation3}} {{Emphasis "italic"}} 204 | highlight Todo {{Foreground .Foreground}} {{Emphasis "bold" "italic"}} 205 | highlight Error {{Foreground .StrongRed}} {{Emphasis "bold" "inverse"}} 206 | 207 | " String constant: "this is a string" 208 | highlight String {{Foreground .Green}} 209 | 210 | " Generic statement 211 | highlight! Statement {{Foreground .Yellow}} 212 | " if, then, else, endif, swicth, etc. 213 | highlight! Conditional {{Foreground .Yellow}} 214 | " for, do, while, etc. 215 | highlight! Repeat {{Foreground .Yellow}} 216 | " case, default, etc. 217 | highlight! Label {{Foreground .Yellow}} 218 | " try, catch, throw 219 | highlight! Exception {{Foreground .Red}} 220 | " sizeof, "+", "*", etc. 221 | highlight! link Operator None 222 | " Any other keyword 223 | highlight! Keyword {{Foreground .Red}} 224 | 225 | " Variable name 226 | highlight! Identifier {{Foreground .StrongBlue}} 227 | " Function name 228 | highlight! Function {{Foreground .Blue}} 229 | 230 | " Generic preprocessor 231 | highlight! PreProc {{Foreground .Magenta}} 232 | " Preprocessor #include 233 | highlight! Include {{Foreground .Magenta}} 234 | " Preprocessor #define 235 | highlight! Define {{Foreground .Magenta}} 236 | " Same as Define 237 | highlight! Macro {{Foreground .Magenta}} 238 | " Preprocessor #if, #else, #endif, etc. 239 | highlight! PreCondit {{Foreground .Magenta}} 240 | 241 | " Generic constant 242 | highlight! Constant {{Foreground .StrongMagenta}} 243 | " Character constant: 'c', '/n' 244 | highlight! Character {{Foreground .StrongMagenta}} 245 | " Boolean constant: TRUE, false 246 | highlight! Boolean {{Foreground .StrongMagenta}} 247 | " Number constant: 234, 0xff 248 | highlight! Number {{Foreground .StrongMagenta}} 249 | " Floating point constant: 2.3e10 250 | highlight! Float {{Foreground .StrongMagenta}} 251 | 252 | " Generic type 253 | highlight! Type {{Foreground .Cyan}} 254 | " static, register, volatile, etc 255 | highlight! StorageClass {{Foreground .Cyan}} 256 | " struct, union, enum, etc. 257 | highlight! Structure {{Foreground .StrongRed}} 258 | " typedef 259 | highlight! Typedef {{Foreground .StrongRed}} 260 | " Completion Menu: 261 | " Popup menu: normal item 262 | highlight Pmenu {{Background .Gradation1}} 263 | " Popup menu: selected item 264 | highlight PmenuSel {{Background .Gradation2}} {{Emphasis "bold"}} 265 | " Popup menu: scrollbar 266 | highlight PmenuSbar {{Background .Gradation2}} 267 | " Popup menu: scrollbar thumb 268 | highlight PmenuThumb {{Background .Gradation2}} 269 | " Quickfix 270 | highlight QuickFixLine {{Foreground .Cyan}} {{Emphasis "bold"}} 271 | " Diffs: 272 | highlight DiffDelete {{Foreground .StrongRed}} {{Background .Background}} 273 | highlight DiffAdd {{Foreground .StrongGreen}} {{Background .Background}} 274 | highlight DiffChange {{Foreground .Cyan}} {{Background .Background}} 275 | highlight DiffText {{Foreground .StrongYellow}} {{Background .Background}} 276 | highlight! link Added DiffAdd 277 | highlight! link Changed DiffChange 278 | highlight! link Removed DiffDelete 279 | " Spelling: 280 | if has("spell") 281 | " Not capitalised word, or compile warnings 282 | highlight SpellCap {{Emphasis "undercurl"}} guisp=#{{.Blue.ToHex}} 283 | " Not recognized word 284 | highlight SpellBad {{Emphasis "undercurl"}} guisp=#{{.Blue.ToHex}} 285 | " Wrong spelling for selected region 286 | highlight SpellLocal {{Emphasis "undercurl"}} guisp=#{{.Cyan.ToHex}} 287 | " Rare word 288 | highlight SpellRare {{Emphasis "undercurl"}} guisp=#{{.Magenta.ToHex}} 289 | endif 290 | 291 | if hlexists('FloatBorder') 292 | highlight FloatBorder None 293 | highlight FloatBorder {{Foreground .Gradation4}} {{Emphasis "bold"}} 294 | highlight FloatShadow None 295 | highlight FloatShadow {{Background .Gradation1}} 296 | endif 297 | 298 | if hlexists('DiagnosticInfo') 299 | highlight DiagnosticDeprecated cterm=strikethrough gui=strikethrough guisp=Red 300 | highlight DiagnosticOk {{Foreground .StrongGreen}} 301 | highlight DiagnosticHint {{Foreground .Gradation3}} 302 | highlight DiagnosticInfo {{Foreground .StrongBlue}} 303 | highlight DiagnosticWarn {{Foreground .StrongRed}} 304 | highlight DiagnosticError {{Foreground .Red}} 305 | highlight DiagnosticUnderlineOk {{Emphasis "underline"}} guisp=#{{.StrongGreen.ToHex}} 306 | highlight DiagnosticUnderlineHint {{Emphasis "underline"}} guisp=#{{.Gradation3.ToHex}} 307 | highlight DiagnosticUnderlineInfo {{Emphasis "underline"}} guisp=#{{.StrongBlue.ToHex}} 308 | highlight DiagnosticUnderlineWarn {{Emphasis "underline"}} guisp=#{{.StrongRed.ToHex}} 309 | highlight DiagnosticUnderlineError {{Emphasis "underline"}} guisp=#{{.Red.ToHex}} 310 | endif 311 | 312 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: 313 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/kyoh86/momiji 2 | 3 | go 1.18 4 | -------------------------------------------------------------------------------- /iterm/momiji.itermcolors: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ansi 0 Color 6 | 7 | Alpha Component 8 | 1 9 | Blue Component 10 | 0.047673974186182022 11 | Color Space 12 | sRGB 13 | Green Component 14 | 0.047673974186182022 15 | Red Component 16 | 0.078431375324726105 17 | 18 | Ansi 1 Color 19 | 20 | Alpha Component 21 | 1 22 | Blue Component 23 | 0.45490193367004395 24 | Color Space 25 | sRGB 26 | Green Component 27 | 0.34117642045021057 28 | Red Component 29 | 0.85490208864212036 30 | 31 | Ansi 10 Color 32 | 33 | Alpha Component 34 | 1 35 | Blue Component 36 | 0.5259515643119812 37 | Color Space 38 | sRGB 39 | Green Component 40 | 0.7450980544090271 41 | Red Component 42 | 0.60564130544662476 43 | 44 | Ansi 11 Color 45 | 46 | Alpha Component 47 | 1 48 | Blue Component 49 | 0.56862747669219971 50 | Color Space 51 | sRGB 52 | Green Component 53 | 0.84206581115722656 54 | Red Component 55 | 1 56 | 57 | Ansi 12 Color 58 | 59 | Alpha Component 60 | 1 61 | Blue Component 62 | 0.88235294818878174 63 | Color Space 64 | sRGB 65 | Green Component 66 | 0.71844851970672607 67 | Red Component 68 | 0.53633219003677368 69 | 70 | Ansi 13 Color 71 | 72 | Alpha Component 73 | 1 74 | Blue Component 75 | 0.820343017578125 76 | Color Space 77 | sRGB 78 | Green Component 79 | 0.63320261240005493 80 | Red Component 81 | 0.93333333730697632 82 | 83 | Ansi 14 Color 84 | 85 | Alpha Component 86 | 1 87 | Blue Component 88 | 0.67450982332229614 89 | Color Space 90 | sRGB 91 | Green Component 92 | 0.69803929328918457 93 | Red Component 94 | 0.41176474094390869 95 | 96 | Ansi 15 Color 97 | 98 | Alpha Component 99 | 1 100 | Blue Component 101 | 0.89019608497619629 102 | Color Space 103 | sRGB 104 | Green Component 105 | 0.89019608497619629 106 | Red Component 107 | 0.90196079015731812 108 | 109 | Ansi 2 Color 110 | 111 | Alpha Component 112 | 1 113 | Blue Component 114 | 0.30523175001144409 115 | Color Space 116 | sRGB 117 | Green Component 118 | 0.54901957511901855 119 | Red Component 120 | 0.20453670620918274 121 | 122 | Ansi 3 Color 123 | 124 | Alpha Component 125 | 1 126 | Blue Component 127 | 0.17051903903484344 128 | Color Space 129 | sRGB 130 | Green Component 131 | 0.65956443548202515 132 | Red Component 133 | 0.90588241815567017 134 | 135 | Ansi 4 Color 136 | 137 | Alpha Component 138 | 1 139 | Blue Component 140 | 0.82352942228317261 141 | Color Space 142 | sRGB 143 | Green Component 144 | 0.51886904239654541 145 | Red Component 146 | 0.28419837355613708 147 | 148 | Ansi 5 Color 149 | 150 | Alpha Component 151 | 1 152 | Blue Component 153 | 0.66666668653488159 154 | Color Space 155 | sRGB 156 | Green Component 157 | 0.35294118523597717 158 | Red Component 159 | 0.6482122540473938 160 | 161 | Ansi 6 Color 162 | 163 | Alpha Component 164 | 1 165 | Blue Component 166 | 0.65882354974746704 167 | Color Space 168 | sRGB 169 | Green Component 170 | 0.56536382436752319 171 | Red Component 172 | 0.12143022567033768 173 | 174 | Ansi 7 Color 175 | 176 | Alpha Component 177 | 1 178 | Blue Component 179 | 0.60000002384185791 180 | Color Space 181 | sRGB 182 | Green Component 183 | 0.60000002384185791 184 | Red Component 185 | 0.62745100259780884 186 | 187 | Ansi 8 Color 188 | 189 | Alpha Component 190 | 1 191 | Blue Component 192 | 0.30588236451148987 193 | Color Space 194 | sRGB 195 | Green Component 196 | 0.30588236451148987 197 | Red Component 198 | 0.35294118523597717 199 | 200 | Ansi 9 Color 201 | 202 | Alpha Component 203 | 1 204 | Blue Component 205 | 0.35793924331665039 206 | Color Space 207 | sRGB 208 | Green Component 209 | 0.52806729078292847 210 | Red Component 211 | 0.96078431606292725 212 | 213 | Background Color 214 | 215 | Alpha Component 216 | 1 217 | Blue Component 218 | 0.047673974186182022 219 | Color Space 220 | sRGB 221 | Green Component 222 | 0.047673974186182022 223 | Red Component 224 | 0.078431375324726105 225 | 226 | Badge Color 227 | 228 | Alpha Component 229 | 0.5 230 | Blue Component 231 | 0.0 232 | Color Space 233 | sRGB 234 | Green Component 235 | 0.1491314172744751 236 | Red Component 237 | 1 238 | 239 | Bold Color 240 | 241 | Alpha Component 242 | 1 243 | Blue Component 244 | 0.9843137264251709 245 | Color Space 246 | sRGB 247 | Green Component 248 | 0.9843137264251709 249 | Red Component 250 | 1 251 | 252 | Cursor Color 253 | 254 | Alpha Component 255 | 1 256 | Blue Component 257 | 0.56862747669219971 258 | Color Space 259 | sRGB 260 | Green Component 261 | 0.84313726425170898 262 | Red Component 263 | 1 264 | 265 | Cursor Guide Color 266 | 267 | Alpha Component 268 | 0.25 269 | Blue Component 270 | 1 271 | Color Space 272 | sRGB 273 | Green Component 274 | 0.9268307089805603 275 | Red Component 276 | 0.70213186740875244 277 | 278 | Cursor Text Color 279 | 280 | Alpha Component 281 | 1 282 | Blue Component 283 | 0.27058818936347961 284 | Color Space 285 | sRGB 286 | Green Component 287 | 0.28627452254295349 288 | Red Component 289 | 0.26666665077209473 290 | 291 | Foreground Color 292 | 293 | Alpha Component 294 | 1 295 | Blue Component 296 | 0.89019608497619629 297 | Color Space 298 | sRGB 299 | Green Component 300 | 0.89019608497619629 301 | Red Component 302 | 0.90196079015731812 303 | 304 | Link Color 305 | 306 | Alpha Component 307 | 1 308 | Blue Component 309 | 0.82352942228317261 310 | Color Space 311 | sRGB 312 | Green Component 313 | 0.51764708757400513 314 | Red Component 315 | 0.28235295414924622 316 | 317 | Selected Text Color 318 | 319 | Alpha Component 320 | 1 321 | Blue Component 322 | 0.94117647409439087 323 | Color Space 324 | sRGB 325 | Green Component 326 | 0.97254902124404907 327 | Red Component 328 | 0.97647064924240112 329 | 330 | Selection Color 331 | 332 | Alpha Component 333 | 1 334 | Blue Component 335 | 0.65882354974746704 336 | Color Space 337 | sRGB 338 | Green Component 339 | 0.56470590829849243 340 | Red Component 341 | 0.12156862765550613 342 | 343 | Tab Color 344 | 345 | Alpha Component 346 | 1 347 | Blue Component 348 | 0.88235294818878174 349 | Color Space 350 | sRGB 351 | Green Component 352 | 0.71764707565307617 353 | Red Component 354 | 0.5372549295425415 355 | 356 | 357 | 358 | -------------------------------------------------------------------------------- /lua/momiji.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@class MomijiHighlightColors 4 | ---@field black string RGB(#rrggbb) color 5 | ---@field red string RGB(#rrggbb) color 6 | ---@field green string RGB(#rrggbb) color 7 | ---@field yellow string RGB(#rrggbb) color 8 | ---@field blue string RGB(#rrggbb) color 9 | ---@field magenta string RGB(#rrggbb) color 10 | ---@field cyan string RGB(#rrggbb) color 11 | ---@field white string RGB(#rrggbb) color 12 | ---@field brightblack string RGB(#rrggbb) color 13 | ---@field brightred string RGB(#rrggbb) color 14 | ---@field brightgreen string RGB(#rrggbb) color 15 | ---@field brightyellow string RGB(#rrggbb) color 16 | ---@field brightblue string RGB(#rrggbb) color 17 | ---@field brightmagenta string RGB(#rrggbb) color 18 | ---@field brightcyan string RGB(#rrggbb) color 19 | ---@field brightwhite string RGB(#rrggbb) color 20 | ---@field gradation1 string RGB(#rrggbb) color 21 | ---@field gradation2 string RGB(#rrggbb) color 22 | ---@field gradation3 string RGB(#rrggbb) color 23 | ---@field gradation4 string RGB(#rrggbb) color 24 | ---@field gradation5 string RGB(#rrggbb) color 25 | ---@field background string RGB(#rrggbb) color 26 | ---@field foreground string RGB(#rrggbb) color 27 | 28 | ---@type MomijiHighlightColors 29 | M.colors = { 30 | black = "#140c0c", 31 | red = "#da5774", 32 | green = "#348c4e", 33 | yellow = "#e7a82b", 34 | blue = "#4884d2", 35 | magenta = "#a55aaa", 36 | cyan = "#1f90a8", 37 | white = "#a09999", 38 | brightblack = "#5a4e4e", 39 | brightred = "#f5875b", 40 | brightgreen = "#9abe86", 41 | brightyellow = "#ffd791", 42 | brightblue = "#89b7e1", 43 | brightmagenta = "#eea1d1", 44 | brightcyan = "#69b2ac", 45 | brightwhite = "#e6e3e3", 46 | gradation1 = "#372a2a", 47 | gradation2 = "#5a4e4e", 48 | gradation3 = "#7d7373", 49 | gradation4 = "#a09999", 50 | gradation5 = "#c3bebe", 51 | background = "#140c0c", 52 | foreground = "#e6e3e3", 53 | } 54 | 55 | ---@class MomijiHighlightColor 56 | ---@field gui string Color for guibg/guifg 57 | ---@field cterm integer Color index for ctermfg/ctermbg 58 | 59 | ---@class MomijiHighlightPalette 60 | ---@field black MomijiHighlightColor 61 | ---@field red MomijiHighlightColor 62 | ---@field green MomijiHighlightColor 63 | ---@field yellow MomijiHighlightColor 64 | ---@field blue MomijiHighlightColor 65 | ---@field magenta MomijiHighlightColor 66 | ---@field cyan MomijiHighlightColor 67 | ---@field white MomijiHighlightColor 68 | ---@field brightblack MomijiHighlightColor 69 | ---@field brightred MomijiHighlightColor 70 | ---@field brightgreen MomijiHighlightColor 71 | ---@field brightyellow MomijiHighlightColor 72 | ---@field brightblue MomijiHighlightColor 73 | ---@field brightmagenta MomijiHighlightColor 74 | ---@field brightcyan MomijiHighlightColor 75 | ---@field brightwhite MomijiHighlightColor 76 | ---@field gradation1 MomijiHighlightColor 77 | ---@field gradation2 MomijiHighlightColor 78 | ---@field gradation3 MomijiHighlightColor 79 | ---@field gradation4 MomijiHighlightColor 80 | ---@field gradation5 MomijiHighlightColor 81 | ---@field background MomijiHighlightColor 82 | ---@field foreground MomijiHighlightColor 83 | 84 | ---@type MomijiHighlightPalette 85 | M.palette = { 86 | black = { gui = "#140c0c", cterm = 0 }, 87 | red = { gui = "#da5774", cterm = 1 }, 88 | green = { gui = "#348c4e", cterm = 2 }, 89 | yellow = { gui = "#e7a82b", cterm = 3 }, 90 | blue = { gui = "#4884d2", cterm = 4 }, 91 | magenta = { gui = "#a55aaa", cterm = 5 }, 92 | cyan = { gui = "#1f90a8", cterm = 6 }, 93 | white = { gui = "#a09999", cterm = 7 }, 94 | brightblack = { gui = "#5a4e4e", cterm = 8 }, 95 | brightred = { gui = "#f5875b", cterm = 9 }, 96 | brightgreen = { gui = "#9abe86", cterm = 10 }, 97 | brightyellow = { gui = "#ffd791", cterm = 11 }, 98 | brightblue = { gui = "#89b7e1", cterm = 12 }, 99 | brightmagenta = { gui = "#eea1d1", cterm = 13 }, 100 | brightcyan = { gui = "#69b2ac", cterm = 14 }, 101 | brightwhite = { gui = "#e6e3e3", cterm = 15 }, 102 | gradation1 = { gui = "#372a2a", cterm = 235 }, 103 | gradation2 = { gui = "#5a4e4e", cterm = 236 }, 104 | gradation3 = { gui = "#7d7373", cterm = 237 }, 105 | gradation4 = { gui = "#a09999", cterm = 238 }, 106 | gradation5 = { gui = "#c3bebe", cterm = 239 }, 107 | background = { gui = "#140c0c", cterm = 0 }, 108 | foreground = { gui = "#e6e3e3", cterm = 15 }, 109 | } 110 | 111 | ---@alias MomijiHighlightEmpha "bold"|"underline"|"undercurl"|"underdouble"|"underdotted"|"underdashed"|"strikethrough"|"reverse"|"inverse"|"italic"|"standout"|"altfont"|"nocombine"|"NONE" 112 | 113 | ---@class MomijiHighlightParam 114 | ---@field fg MomijiHighlightColor Foreground color 115 | ---@field bg MomijiHighlightColor Background color 116 | ---@field empha MomijiHighlightEmpha[] Special highlight for emphasis text. 117 | ---@field guisp MomijiHighlightColor Color for various underlines 118 | ---@field blend integer Blend level for a highlight group 119 | 120 | ---Set a highlight group. 121 | ---Which color for "fg" or "bg", you can get it from "palette". 122 | ---e.g.: require"momiji.colors".highlight("Pmenu", { fg = require"momiji.colors".palette.red }) 123 | ---@param group string Target highlight group name. 124 | ---@param params MomijiHighlightParam 125 | function M.highlight(group, params) 126 | vim.validate("group", group, "string") 127 | vim.validate("params", params, "table") 128 | local histr = { "highlight", group } 129 | 130 | local fg = vim.tbl_get(params, "fg", "foreground") or {} 131 | if #fg >= 2 then 132 | vim.list_extend(histr, { "guifg=" .. fg.gui, "ctermfg=" .. fg.cterm }) 133 | end 134 | 135 | local bg = vim.tbl_get(params, "bg", "background") or {} 136 | if #bg >= 2 then 137 | vim.list_extend(histr, { "guibg=" .. bg.gui, "ctermbg=" .. bg.cterm }) 138 | end 139 | 140 | local empha = vim.tbl_filter(function(v) 141 | return v ~= "" 142 | end, params.empha or {}) 143 | 144 | if #empha > 0 then 145 | local em = table.concat(empha, ",") 146 | vim.list_extend(histr, { "gui=" .. em, "cterm=" .. em }) 147 | end 148 | 149 | local guisp = params.guisp or {} 150 | if #guisp > 0 then 151 | table.insert(histr, "guisp=" .. guisp.gui) 152 | end 153 | 154 | vim.cmd.execute(table.concat(histr, " ")) 155 | end 156 | 157 | return M 158 | -------------------------------------------------------------------------------- /lua/momiji.lua.tmpl: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@class MomijiHighlightColors 4 | ---@field black string RGB(#rrggbb) color 5 | ---@field red string RGB(#rrggbb) color 6 | ---@field green string RGB(#rrggbb) color 7 | ---@field yellow string RGB(#rrggbb) color 8 | ---@field blue string RGB(#rrggbb) color 9 | ---@field magenta string RGB(#rrggbb) color 10 | ---@field cyan string RGB(#rrggbb) color 11 | ---@field white string RGB(#rrggbb) color 12 | ---@field brightblack string RGB(#rrggbb) color 13 | ---@field brightred string RGB(#rrggbb) color 14 | ---@field brightgreen string RGB(#rrggbb) color 15 | ---@field brightyellow string RGB(#rrggbb) color 16 | ---@field brightblue string RGB(#rrggbb) color 17 | ---@field brightmagenta string RGB(#rrggbb) color 18 | ---@field brightcyan string RGB(#rrggbb) color 19 | ---@field brightwhite string RGB(#rrggbb) color 20 | ---@field gradation1 string RGB(#rrggbb) color 21 | ---@field gradation2 string RGB(#rrggbb) color 22 | ---@field gradation3 string RGB(#rrggbb) color 23 | ---@field gradation4 string RGB(#rrggbb) color 24 | ---@field gradation5 string RGB(#rrggbb) color 25 | ---@field background string RGB(#rrggbb) color 26 | ---@field foreground string RGB(#rrggbb) color 27 | 28 | ---@type MomijiHighlightColors 29 | M.colors = { 30 | black = "#{{.Black.ToHex}}", 31 | red = "#{{.Red.ToHex}}", 32 | green = "#{{.Green.ToHex}}", 33 | yellow = "#{{.Yellow.ToHex}}", 34 | blue = "#{{.Blue.ToHex}}", 35 | magenta = "#{{.Magenta.ToHex}}", 36 | cyan = "#{{.Cyan.ToHex}}", 37 | white = "#{{.White.ToHex}}", 38 | brightblack = "#{{.BrightBlack.ToHex}}", 39 | brightred = "#{{.BrightRed.ToHex}}", 40 | brightgreen = "#{{.BrightGreen.ToHex}}", 41 | brightyellow = "#{{.BrightYellow.ToHex}}", 42 | brightblue = "#{{.BrightBlue.ToHex}}", 43 | brightmagenta = "#{{.BrightMagenta.ToHex}}", 44 | brightcyan = "#{{.BrightCyan.ToHex}}", 45 | brightwhite = "#{{.BrightWhite.ToHex}}", 46 | gradation1 = "#{{.Gradation1.ToHex}}", 47 | gradation2 = "#{{.Gradation2.ToHex}}", 48 | gradation3 = "#{{.Gradation3.ToHex}}", 49 | gradation4 = "#{{.Gradation4.ToHex}}", 50 | gradation5 = "#{{.Gradation5.ToHex}}", 51 | background = "#{{.Background.ToHex}}", 52 | foreground = "#{{.Foreground.ToHex}}", 53 | } 54 | 55 | ---@class MomijiHighlightColor 56 | ---@field gui string Color for guibg/guifg 57 | ---@field cterm integer Color index for ctermfg/ctermbg 58 | 59 | ---@class MomijiHighlightPalette 60 | ---@field black MomijiHighlightColor 61 | ---@field red MomijiHighlightColor 62 | ---@field green MomijiHighlightColor 63 | ---@field yellow MomijiHighlightColor 64 | ---@field blue MomijiHighlightColor 65 | ---@field magenta MomijiHighlightColor 66 | ---@field cyan MomijiHighlightColor 67 | ---@field white MomijiHighlightColor 68 | ---@field brightblack MomijiHighlightColor 69 | ---@field brightred MomijiHighlightColor 70 | ---@field brightgreen MomijiHighlightColor 71 | ---@field brightyellow MomijiHighlightColor 72 | ---@field brightblue MomijiHighlightColor 73 | ---@field brightmagenta MomijiHighlightColor 74 | ---@field brightcyan MomijiHighlightColor 75 | ---@field brightwhite MomijiHighlightColor 76 | ---@field gradation1 MomijiHighlightColor 77 | ---@field gradation2 MomijiHighlightColor 78 | ---@field gradation3 MomijiHighlightColor 79 | ---@field gradation4 MomijiHighlightColor 80 | ---@field gradation5 MomijiHighlightColor 81 | ---@field background MomijiHighlightColor 82 | ---@field foreground MomijiHighlightColor 83 | 84 | ---@type MomijiHighlightPalette 85 | M.palette = { 86 | black = { gui = "#{{.Black.ToHex}}", cterm = {{.Black.Index}} }, 87 | red = { gui = "#{{.Red.ToHex}}", cterm = {{.Red.Index}} }, 88 | green = { gui = "#{{.Green.ToHex}}", cterm = {{.Green.Index}} }, 89 | yellow = { gui = "#{{.Yellow.ToHex}}", cterm = {{.Yellow.Index}} }, 90 | blue = { gui = "#{{.Blue.ToHex}}", cterm = {{.Blue.Index}} }, 91 | magenta = { gui = "#{{.Magenta.ToHex}}", cterm = {{.Magenta.Index}} }, 92 | cyan = { gui = "#{{.Cyan.ToHex}}", cterm = {{.Cyan.Index}} }, 93 | white = { gui = "#{{.White.ToHex}}", cterm = {{.White.Index}} }, 94 | brightblack = { gui = "#{{.BrightBlack.ToHex}}", cterm = {{.BrightBlack.Index}} }, 95 | brightred = { gui = "#{{.BrightRed.ToHex}}", cterm = {{.BrightRed.Index}} }, 96 | brightgreen = { gui = "#{{.BrightGreen.ToHex}}", cterm = {{.BrightGreen.Index}} }, 97 | brightyellow = { gui = "#{{.BrightYellow.ToHex}}", cterm = {{.BrightYellow.Index}} }, 98 | brightblue = { gui = "#{{.BrightBlue.ToHex}}", cterm = {{.BrightBlue.Index}} }, 99 | brightmagenta = { gui = "#{{.BrightMagenta.ToHex}}", cterm = {{.BrightMagenta.Index}} }, 100 | brightcyan = { gui = "#{{.BrightCyan.ToHex}}", cterm = {{.BrightCyan.Index}} }, 101 | brightwhite = { gui = "#{{.BrightWhite.ToHex}}", cterm = {{.BrightWhite.Index}} }, 102 | gradation1 = { gui = "#{{.Gradation1.ToHex}}", cterm = {{.Gradation1.Index}} }, 103 | gradation2 = { gui = "#{{.Gradation2.ToHex}}", cterm = {{.Gradation2.Index}} }, 104 | gradation3 = { gui = "#{{.Gradation3.ToHex}}", cterm = {{.Gradation3.Index}} }, 105 | gradation4 = { gui = "#{{.Gradation4.ToHex}}", cterm = {{.Gradation4.Index}} }, 106 | gradation5 = { gui = "#{{.Gradation5.ToHex}}", cterm = {{.Gradation5.Index}} }, 107 | background = { gui = "#{{.Background.ToHex}}", cterm = {{.Background.Index}} }, 108 | foreground = { gui = "#{{.Foreground.ToHex}}", cterm = {{.Foreground.Index}} }, 109 | } 110 | 111 | ---@alias MomijiHighlightEmpha "bold"|"underline"|"undercurl"|"underdouble"|"underdotted"|"underdashed"|"strikethrough"|"reverse"|"inverse"|"italic"|"standout"|"altfont"|"nocombine"|"NONE" 112 | 113 | ---@class MomijiHighlightParam 114 | ---@field fg MomijiHighlightColor Foreground color 115 | ---@field bg MomijiHighlightColor Background color 116 | ---@field empha MomijiHighlightEmpha[] Special highlight for emphasis text. 117 | ---@field guisp MomijiHighlightColor Color for various underlines 118 | ---@field blend integer Blend level for a highlight group 119 | 120 | ---Set a highlight group. 121 | ---Which color for "fg" or "bg", you can get it from "palette". 122 | ---e.g.: require"momiji.colors".highlight("Pmenu", { fg = require"momiji.colors".palette.red }) 123 | ---@param group string Target highlight group name. 124 | ---@param params MomijiHighlightParam 125 | function M.highlight(group, params) 126 | vim.validate("group", group, "string") 127 | vim.validate("params", params, "table") 128 | local histr = { "highlight", group } 129 | 130 | local fg = vim.tbl_get(params, "fg", "foreground") or {} 131 | if #fg >= 2 then 132 | vim.list_extend(histr, { "guifg=" .. fg.gui, "ctermfg=" .. fg.cterm }) 133 | end 134 | 135 | local bg = vim.tbl_get(params, "bg", "background") or {} 136 | if #bg >= 2 then 137 | vim.list_extend(histr, { "guibg=" .. bg.gui, "ctermbg=" .. bg.cterm }) 138 | end 139 | 140 | local empha = vim.tbl_filter(function(v) 141 | return v ~= "" 142 | end, params.empha or {}) 143 | 144 | if #empha > 0 then 145 | local em = table.concat(empha, ",") 146 | vim.list_extend(histr, { "gui=" .. em, "cterm=" .. em }) 147 | end 148 | 149 | local guisp = params.guisp or {} 150 | if #guisp > 0 then 151 | table.insert(histr, "guisp=" .. guisp.gui) 152 | end 153 | 154 | vim.cmd.execute(table.concat(histr, " ")) 155 | end 156 | 157 | return M 158 | -------------------------------------------------------------------------------- /lua/momiji_test.lua: -------------------------------------------------------------------------------- 1 | describe("momiji-highlight", function() 2 | local momiji = require("momiji") 3 | it("should run normaly", function() 4 | assert.has_no.errors(function() 5 | momiji.highlight("testhi", {}) 6 | end) 7 | assert.has_no.errors(function() 8 | momiji.highlight("testhi", { fg = momiji.palette.black }) 9 | end) 10 | assert.has_no.errors(function() 11 | momiji.highlight("testhi", { fg = momiji.palette.black, bg = momiji.palette.red, empha = { "bold", "undercurl" }, guisp = momiji.palette.blue, blend = 0.3 }) 12 | end) 13 | end) 14 | end) 15 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "html/template" 6 | "io/fs" 7 | "log" 8 | "os" 9 | "path/filepath" 10 | "strings" 11 | ) 12 | 13 | func main() { 14 | if err := do(); err != nil { 15 | log.Fatal(err) 16 | } 17 | } 18 | 19 | func do() error { 20 | return filepath.Walk(".", func(path string, info fs.FileInfo, err error) error { 21 | if err != nil { 22 | log.Printf("failed to traverse %s: %s", path, err) 23 | } 24 | if info.IsDir() { 25 | return nil 26 | } 27 | if !strings.HasSuffix(path, ".tmpl") { 28 | return nil 29 | } 30 | 31 | source, err := os.ReadFile(path) 32 | if err != nil { 33 | return fmt.Errorf("reading source: %w", err) 34 | } 35 | output := strings.TrimSuffix(path, ".tmpl") 36 | 37 | tmp := template.New("hoge").Funcs(map[string]any{ 38 | "Foreground": Foreground, 39 | "Background": Background, 40 | "Emphasis": Emphasis, 41 | }) 42 | tmp, err = tmp.Parse(string(source)) 43 | if err != nil { 44 | return fmt.Errorf("parsing source file: %w", err) 45 | } 46 | writer, err := os.OpenFile(output, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644) 47 | if err != nil { 48 | return fmt.Errorf("opening output file: %w", err) 49 | } 50 | defer writer.Close() 51 | if err := tmp.Execute(writer, Palette); err != nil { 52 | return fmt.Errorf("executing template: %w", err) 53 | } 54 | log.Printf("generated %s from %s", output, path) 55 | return nil 56 | }) 57 | } 58 | -------------------------------------------------------------------------------- /momiji-colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyoh86/momiji/944684791449557c09fa4e2b11a6d161db756c00/momiji-colors.png -------------------------------------------------------------------------------- /momiji-lightline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyoh86/momiji/944684791449557c09fa4e2b11a6d161db756c00/momiji-lightline.png -------------------------------------------------------------------------------- /momiji-lightline.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyoh86/momiji/944684791449557c09fa4e2b11a6d161db756c00/momiji-lightline.psd -------------------------------------------------------------------------------- /momiji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyoh86/momiji/944684791449557c09fa4e2b11a6d161db756c00/momiji.png -------------------------------------------------------------------------------- /palette.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type ColorPalette struct { 4 | Black Color 5 | Red Color 6 | Green Color 7 | Yellow Color 8 | Blue Color 9 | Magenta Color 10 | Cyan Color 11 | White Color 12 | BrightBlack Color 13 | BrightRed Color 14 | BrightGreen Color 15 | BrightYellow Color 16 | BrightBlue Color 17 | BrightMagenta Color 18 | BrightCyan Color 19 | BrightWhite Color 20 | Gradation1 Color 21 | Gradation2 Color 22 | Gradation3 Color 23 | Gradation4 Color 24 | Gradation5 Color 25 | 26 | Background Color 27 | Foreground Color 28 | 29 | WeakRed Color 30 | WeakGreen Color 31 | WeakYellow Color 32 | WeakBlue Color 33 | WeakMagenta Color 34 | WeakCyan Color 35 | StrongRed Color 36 | StrongGreen Color 37 | StrongYellow Color 38 | StrongBlue Color 39 | StrongMagenta Color 40 | StrongCyan Color 41 | } 42 | 43 | var Palette = ColorPalette{ 44 | Black: Color{ 45 | RGBA: FromHex("140c0c"), 46 | Index: 0, 47 | }, 48 | Red: Color{ 49 | RGBA: FromHex("da5774"), 50 | Index: 1, 51 | }, 52 | Green: Color{ 53 | RGBA: FromHex("348c4e"), 54 | Index: 2, 55 | }, 56 | Yellow: Color{ 57 | RGBA: FromHex("e7a82b"), 58 | Index: 3, 59 | }, 60 | Blue: Color{ 61 | RGBA: FromHex("4884d2"), 62 | Index: 4, 63 | }, 64 | Magenta: Color{ 65 | RGBA: FromHex("a55aaa"), 66 | Index: 5, 67 | }, 68 | Cyan: Color{ 69 | RGBA: FromHex("1f90a8"), 70 | Index: 6, 71 | }, 72 | White: Color{ 73 | RGBA: FromHex("a09999"), // Gradation4 74 | Index: 7, 75 | }, 76 | BrightBlack: Color{ 77 | RGBA: FromHex("5a4e4e"), // Gradation2 78 | Index: 8, 79 | }, 80 | BrightRed: Color{ 81 | RGBA: FromHex("f5875b"), 82 | Index: 9, 83 | }, 84 | BrightGreen: Color{ 85 | RGBA: FromHex("9abe86"), 86 | Index: 10, 87 | }, 88 | BrightYellow: Color{ 89 | RGBA: FromHex("ffd791"), 90 | Index: 11, 91 | }, 92 | BrightBlue: Color{ 93 | RGBA: FromHex("89b7e1"), 94 | Index: 12, 95 | }, 96 | BrightMagenta: Color{ 97 | RGBA: FromHex("eea1d1"), 98 | Index: 13, 99 | }, 100 | BrightCyan: Color{ 101 | RGBA: FromHex("69b2ac"), 102 | Index: 14, 103 | }, 104 | BrightWhite: Color{ 105 | RGBA: FromHex("e6e3e3"), 106 | Index: 15, 107 | }, 108 | Gradation1: Color{ 109 | RGBA: FromHex("372a2a"), 110 | Index: 235, 111 | }, 112 | Gradation2: Color{ 113 | RGBA: FromHex("5a4e4e"), 114 | Index: 236, 115 | }, 116 | Gradation3: Color{ 117 | RGBA: FromHex("7d7373"), 118 | Index: 237, 119 | }, 120 | Gradation4: Color{ 121 | RGBA: FromHex("a09999"), 122 | Index: 238, 123 | }, 124 | Gradation5: Color{ 125 | RGBA: FromHex("c3bebe"), 126 | Index: 239, 127 | }, 128 | } 129 | 130 | func init() { 131 | Palette.Background = Palette.Black 132 | Palette.Foreground = Palette.BrightWhite 133 | 134 | Palette.WeakRed = Palette.Red 135 | Palette.WeakGreen = Palette.Green 136 | Palette.WeakYellow = Palette.Yellow 137 | Palette.WeakBlue = Palette.Blue 138 | Palette.WeakMagenta = Palette.Magenta 139 | Palette.WeakCyan = Palette.Cyan 140 | 141 | Palette.StrongRed = Palette.BrightRed 142 | Palette.StrongGreen = Palette.BrightGreen 143 | Palette.StrongYellow = Palette.BrightYellow 144 | Palette.StrongBlue = Palette.BrightBlue 145 | Palette.StrongMagenta = Palette.BrightMagenta 146 | Palette.StrongCyan = Palette.BrightCyan 147 | } 148 | -------------------------------------------------------------------------------- /vim.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | func Foreground(c Color) string { 9 | return fmt.Sprintf("guifg=#%02x%02x%02x ctermfg=%d", c.RGBA.R, c.RGBA.G, c.RGBA.B, c.Index) 10 | } 11 | 12 | func Background(c Color) string { 13 | return fmt.Sprintf("guibg=#%02x%02x%02x ctermbg=%d", c.RGBA.R, c.RGBA.G, c.RGBA.B, c.Index) 14 | } 15 | 16 | func Emphasis(emphases ...string) string { 17 | return fmt.Sprintf("gui=%[1]s cterm=%[1]s", strings.Join(emphases, ",")) 18 | } 19 | -------------------------------------------------------------------------------- /wezterm/momiji.toml: -------------------------------------------------------------------------------- 1 | [colors] 2 | foreground = "#e6e3e3" 3 | background = "#140c0c" 4 | 5 | cursor_bg = "#ffd791" 6 | cursor_border = "#ffd791" 7 | cursor_fg = "#140c0c" 8 | 9 | selection_bg = "#e7a82b" 10 | selection_fg = "#140c0c" 11 | 12 | ansi = [ "#140c0c", "#da5774", "#348c4e", "#e7a82b", "#4884d2", "#a55aaa", "#1f90a8", "#a09999" ] 13 | brights = [ "#5a4e4e", "#f5875b", "#9abe86", "#ffd791", "#89b7e1", "#eea1d1", "#69b2ac", "#e6e3e3" ] 14 | -------------------------------------------------------------------------------- /wezterm/momiji.toml.tmpl: -------------------------------------------------------------------------------- 1 | [colors] 2 | foreground = "#{{.BrightWhite.ToHex}}" 3 | background = "#{{.Black.ToHex}}" 4 | 5 | cursor_bg = "#{{.BrightYellow.ToHex}}" 6 | cursor_border = "#{{.BrightYellow.ToHex}}" 7 | cursor_fg = "#{{.Black.ToHex}}" 8 | 9 | selection_bg = "#{{.Yellow.ToHex}}" 10 | selection_fg = "#{{.Black.ToHex}}" 11 | 12 | ansi = [ "#{{.Black.ToHex}}", "#{{.Red.ToHex}}", "#{{.Green.ToHex}}", "#{{.Yellow.ToHex}}", "#{{.Blue.ToHex}}", "#{{.Magenta.ToHex}}", "#{{.Cyan.ToHex}}", "#{{.White.ToHex}}" ] 13 | brights = [ "#{{.BrightBlack.ToHex}}", "#{{.BrightRed.ToHex}}", "#{{.BrightGreen.ToHex}}", "#{{.BrightYellow.ToHex}}", "#{{.BrightBlue.ToHex}}", "#{{.BrightMagenta.ToHex}}", "#{{.BrightCyan.ToHex}}", "#{{.BrightWhite.ToHex}}" ] 14 | --------------------------------------------------------------------------------