Add public API function to get Nord colors (#224)

Implemented the `NordPalette` pubic API function that returns all Nord
colors as dictionary. This allows to use the colors in other Vim scripts
without the need to copy & paste the colors from the documentations or
the Nord Vim theme sources.

Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com>
Co-authored-by: Sven Greb <development@svengreb.de>

Closes GH-224
This commit is contained in:
Jan Damm 2021-05-02 11:35:08 +02:00 committed by GitHub
parent ea7ff9c343
commit 5867535cea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -772,3 +772,17 @@ hi! link VimwikiList markdownListMarker
" YAML " YAML
" > stephpy/vim-yaml " > stephpy/vim-yaml
call s:hi("yamlKey", s:nord7_gui, "", s:nord7_term, "", "", "") call s:hi("yamlKey", s:nord7_gui, "", s:nord7_term, "", "", "")
"+------------+
"+ Public API +
"+------------+
"+--- Functions ---+
function! NordPalette() abort
let ret = {}
for color in range(16)
execute 'let ret["nord'.color.'"] = s:nord'.color.'_gui'
endfor
let ret["nord3_bright"] = s:nord3_gui_bright
return ret
endfunction