Initial commit

release
Jake Bauer 2022-09-24 14:12:05 -04:00
commit ad0a764fee
4 changed files with 268 additions and 0 deletions

19
LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright © Refer to https://github.com/fxn/vim-monochrome/graphs/contributors
Copyright © 2022, Jake Bauer <jbauer@paritybit.ca>
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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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.

35
README.md Normal file
View File

@ -0,0 +1,35 @@
## Dieter Rams - A light Vim color scheme based on Dieter Rams colours
Inspired by this post: [https://merveilles.town/web/@daletnoon/109054505847473175](https://merveilles.town/web/@daletnoon/109054505847473175).
### Look & Feel
Comments are rendered using italics.
`vim-dieter-rams` works in GUI/true-color terminals, as well as 256-color terminals:
![Dieter Rams Vim color scheme](img/vim-dieter-rams.png)
### Installation
Install as you would any other vim package. For example, using Vim's built-in
plugin management, put the `vim-dieter-rams` directory in the
`~/.vim/pack/bundle/start/` directory.
You can also install it as any other colour scheme by placing the contents of
`vim-dieter-rams/colors` into your `~/.vim/colors/` folder.
### Configuration
Add the following line to your `vimrc` or `init.vim`:
```
colorscheme dieter-rams
```
Note that to get the most accurate colours, it's best to use the setting
"termguicolors" in your `vimrc` or `init.vim`:
```
set termguicolors
```

214
colors/dieter-rams.vim Normal file
View File

@ -0,0 +1,214 @@
" dieter-rams.vim
" Framework Author: Xavier Noria <fxn@hashref.com>
" License: MIT
" Colourscheme By: Jake Bauer <jbauer@paritybit.ca>
set background=light
hi clear
if exists('syntax_on')
syntax reset
endif
let g:colors_name = 'dieter-rams'
let s:black = ['#000000', 16]
let s:red = ['#BF1B1B', 124]
let s:green = ['#736B1E', 94]
let s:orange = ['#ED3F1C', 202]
let s:yellow = ['#D17008', 166] " Darker than the reference, for readability
let s:white = ['#D9D2C6', 188]
let s:cursorline = ['#BAA582', 144]
let s:comment = ['#444444', 238]
let s:faded = ['#AAA59B', 145]
let s:default_fg = s:black
let s:default_bg = s:white
let s:italic = 'italic'
let s:bold = 'bold'
let s:underline = 'underline'
let s:none = 'NONE'
let s:default_lst = []
let s:default_str = ''
let s:comment_attr = s:italic
function! s:hi(...)
let group = a:1
let fg = get(a:, 2, s:default_fg)
let bg = get(a:, 3, s:default_bg)
let attr = get(a:, 4, s:default_str)
let cmd = ['hi', group]
if fg != s:default_lst
call add(cmd, 'guifg='.fg[0])
call add(cmd, 'ctermfg='.fg[1])
endif
if bg != s:default_lst
call add(cmd, 'guibg='.bg[0])
call add(cmd, 'ctermbg='.bg[1])
endif
if attr != s:default_str
call add(cmd, 'gui='.attr)
call add(cmd, 'cterm='.attr)
endif
exec "hi clear " group
exec join(cmd, ' ')
endfunction
" --- Vim interface ------------------------------------------------------------
call s:hi('Normal', s:black, s:white, s:none)
call s:hi('Cursor', s:white, s:black)
call s:hi('CursorLine', s:black, s:faded, s:none)
call s:hi('CursorLineNr', s:black, s:default_bg, s:bold)
call s:hi('ColorColumn', s:black, s:faded)
call s:hi('Search', s:black, s:faded)
call s:hi('Visual', s:black, s:faded)
call s:hi('ErrorMsg', s:red, s:default_bg)
" Status bar
call s:hi('StatusLine', s:black, s:faded)
call s:hi('StatusLineNC', s:black, s:faded)
" Tildes at the bottom of a buffer, etc.
call s:hi('NonText', s:yellow)
" Folding.
call s:hi('FoldColumn', s:faded)
call s:hi('Folded')
" Line numbers gutter.
call s:hi('LineNr', s:black, s:white)
" Small arrow used for tabs.
call s:hi('SpecialKey', s:yellow, s:default_bg, s:bold)
" File browsers.
call s:hi('Directory', s:black, s:default_bg, s:bold)
" Help.
call s:hi('helpSpecial')
call s:hi('helpHyperTextJump', s:yellow, s:default_bg, s:underline)
call s:hi('helpNote')
" Popup menu.
call s:hi('Pmenu', s:black, s:faded)
call s:hi('PmenuSel', s:black, s:cursorline)
" Notes.
call s:hi('Todo', s:black, s:default_bg, s:bold)
" Signs.
call s:hi('SignColumn')
" --- Diff Mode ----------------------------------------------------------------
call s:hi('DiffAdd', s:green, s:default_bg)
call s:hi('DiffDelete', s:red, s:default_bg)
call s:hi('DiffChange', s:black, s:default_bg)
call s:hi('DiffText', s:yellow, s:default_bg)
" --- Programming languages ----------------------------------------------------
call s:hi('Statement', s:yellow, s:default_bg)
call s:hi('PreProc', s:yellow, s:default_bg)
call s:hi('String', s:green)
call s:hi('Comment', s:comment, s:default_bg, s:comment_attr)
call s:hi('Constant', s:yellow, s:default_bg)
call s:hi('Number', s:orange)
call s:hi('Type', s:green, s:default_bg)
call s:hi('Function', s:black)
call s:hi('Identifier', s:default_fg, s:default_bg, s:none)
call s:hi('Special')
call s:hi('MatchParen', s:black, s:faded, s:underline)
call s:hi('Error', s:red, s:white)
" --- VimL ---------------------------------------------------------------------
call s:hi('vimOption')
call s:hi('vimGroup')
call s:hi('vimHiClear')
call s:hi('vimHiGroup')
call s:hi('vimHiAttrib')
call s:hi('vimHiGui')
call s:hi('vimHiGuiFgBg')
call s:hi('vimHiCTerm')
call s:hi('vimHiCTermFgBg')
call s:hi('vimSynType')
hi link vimCommentTitle Comment
" --- Ruby ---------------------------------------------------------------------
call s:hi('rubyConstant')
call s:hi('rubySharpBang', s:comment)
call s:hi('rubyStringDelimiter', s:yellow)
call s:hi('rubyStringEscape', s:yellow)
call s:hi('rubyRegexpEscape', s:yellow)
call s:hi('rubyRegexpAnchor', s:yellow)
call s:hi('rubyRegexpSpecial', s:yellow)
" --- Elixir -------------------------------------------------------------------
call s:hi('elixirAlias', s:default_fg, s:default_bg, s:none)
call s:hi('elixirDelimiter', s:yellow)
call s:hi('elixirSelf', s:default_fg, s:default_bg, s:none)
" For ||, ->, etc.
call s:hi('elixirOperator')
" Module attributes like @doc or @type.
hi link elixirVariable Statement
" While rendered as comments in other languages, docstrings are strings,
" experimental.
hi link elixirDocString String
hi link elixirDocTest String
hi link elixirStringDelimiter String
" --- Perl ---------------------------------------------------------------------
call s:hi('perlSharpBang', s:comment)
call s:hi('perlStringStartEnd', s:yellow)
call s:hi('perlStringEscape', s:yellow)
call s:hi('perlMatchStartEnd', s:yellow)
" --- Python -------------------------------------------------------------------
call s:hi('pythonEscape', s:yellow)
" --- JavaScript ---------------------------------------------------------------
call s:hi('javaScriptFunction', s:black, s:default_bg, s:bold)
" --- Diffs --------------------------------------------------------------------
call s:hi('diffFile', s:faded)
call s:hi('diffNewFile', s:faded)
call s:hi('diffIndexLine', s:comment)
call s:hi('diffLine', s:yellow)
call s:hi('diffSubname', s:faded)
call s:hi('diffAdded', s:green)
call s:hi('diffRemoved', s:red)
" --- Markdown -----------------------------------------------------------------
call s:hi('Title', s:black, s:default_bg, s:bold)
call s:hi('markdownHeadingDelimiter', s:black, s:default_bg, s:bold)
call s:hi('markdownHeadingRule', s:black, s:default_bg, s:bold)
call s:hi('markdownLinkText', s:orange, s:default_bg, s:underline)
" --- HTML ---------------------------------------------------------------------
call s:hi('htmlLink', s:orange, s:default_bg, s:underline)
call s:hi('htmlArg', s:default_fg, s:default_bg)
" --- Gemini -------------------------------------------------------------------
" Based on this plugin: https://tildegit.org/sloum/gemini-vim-syntax
call s:hi('gmiHeader', s:black, s:default_bg, s:bold)
call s:hi('gmiLinkStart', s:black, s:default_bg, s:bold)
call s:hi('gmiLinkURL', s:orange, s:default_bg, s:underline)
call s:hi('gmiLinkTitle', s:yellow, s:default_bg, s:none)
call s:hi('gmiMono', s:yellow, s:default_bg, s:bold)
call s:hi('gmiQuoteLine', s:yellow, s:default_bg, s:bold)
" --- Spelling -----------------------------------------------------------------
call s:hi('SpellBad', s:red, s:default_bg, s:bold, s:underline)
call s:hi('SpellCap', s:black, s:default_bg, s:bold)
call s:hi('SpellLocal', s:default_fg, s:default_bg, s:none)
call s:hi('SpellRare', s:default_fg, s:default_bg, s:none)

BIN
img/vim-dieter-rams.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB