From 10fc18f49433c940c6da48b5ad5029801d443548 Mon Sep 17 00:00:00 2001 From: gryf Date: Tue, 19 Jan 2021 19:07:12 +0100 Subject: [PATCH] Update rgb function and its name. --- colors/wombat256grf.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/colors/wombat256grf.vim b/colors/wombat256grf.vim index e781564..fd1af4f 100644 --- a/colors/wombat256grf.vim +++ b/colors/wombat256grf.vim @@ -153,7 +153,7 @@ fun s:get_color(r, g, b) endfun " returns the palette index to approximate the 'rrggbb' hex string -fun rgb(rgb) +fun s:get_rgb_as_index(rgb) let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 @@ -163,10 +163,10 @@ endfun " sets the highlighting for the given group fun X(group, fg, bg, attr) if a:fg != "" - exec "hi ".a:group." guifg=#".a:fg." ctermfg=".rgb(a:fg) + exec "hi ".a:group." guifg=#".a:fg." ctermfg=".s:get_rgb_as_index(a:fg) endif if a:bg != "" - exec "hi ".a:group." guibg=#".a:bg." ctermbg=".rgb(a:bg) + exec "hi ".a:group." guibg=#".a:bg." ctermbg=".s:get_rgb_as_index(a:bg) endif if a:attr != "" if a:attr == 'italic' @@ -181,7 +181,7 @@ endfun fun Y(group, bg) if ! has('gui_running') if a:bg != "" - exec "hi ".a:group." ctermbg=".rgb(a:bg) + exec "hi ".a:group." ctermbg=".s:get_rgb_as_index(a:bg) endif else if a:bg != "" @@ -317,7 +317,7 @@ call X("SyntasticStyleWarningSign", "", "ffaa00", "") " delete functions {{{ delf Y delf X -delf rgb +delf s:get_rgb_as_index delf s:get_color delf s:get_rgb_idx delf s:get_rgb_level