From 5867535cea7bb6b4c219fa0726c93e4b055debd2 Mon Sep 17 00:00:00 2001 From: Jan Damm Date: Sun, 2 May 2021 11:35:08 +0200 Subject: 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 Co-authored-by: Sven Greb Closes GH-224 --- colors/nord.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/colors/nord.vim b/colors/nord.vim index 5a251da..13d9182 100755 --- a/colors/nord.vim +++ b/colors/nord.vim @@ -772,3 +772,17 @@ hi! link VimwikiList markdownListMarker " YAML " > stephpy/vim-yaml 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 -- cgit v1.2.3-70-g09d2