Skip to content
Browse files

Extended poldownlist example

Added <Leader>cc mapping for invoking ColorChooser to plugin
Changed function names in xterm88 to include "88" in names
Added map from color name to rgb values.
If log file in non-writeable directory, write to $HOME directory
Add logforce method which logs by-passing boolean guard
Added autoload action guard let g:forms_reload_highlights_on_colorscheme_event
Add function! g:ShouldLoadeHighlights() which loads
    checks if highlights should be loaded
Added foreground (light/dark) color variables
Added foreground color to some of the highlights
Added function allowing pattern to be directly used in defining highlight
Select list now starts display at it chosen postion, rather than always
    at 0.
Popdown list now uses Select list (rather than menu) and is some
    500 to 1000 faster to build.
Background Glyph now takes optional bacground highlight
If its a read-only-file, then Forms converts it to read-file
    and on Forms exit restores to read-only
  • Loading branch information...
1 parent 44e31fd commit 2a06ba24b5659ceab2a752910884df72248775e9 megaannum committed Sep 23, 2012
Showing with 1,329 additions and 124 deletions.
  1. +245 −116 autoload/forms.vim
  2. +1,031 −0 autoload/forms/color/util.vim
  3. +3 −3 autoload/forms/color/xterm88.vim
  4. +27 −4 autoload/forms/example/popdownlist.vim
  5. +21 −1 doc/forms.txt
  6. +2 −0 plugin/forms.vim
View
361 autoload/forms.vim
@@ -5,8 +5,8 @@
" File: forms.vim
" Summary: Vim Form Library
" Author: Richard Emberson <richard.n.embersonATgmailDOTcom>
-" Last Modified: 08/30/2012
-" Version: 1.6
+" Last Modified: 09/20/2012
+" Version: 1.7
" Modifications:
" 1.0 : initial public release.
"
@@ -121,8 +121,13 @@ endif
" Forms Logging: {{{1
" ++++++++++++++++++++++++++++++++++++++++++++
if ! exists("g:forms_log_file") || g:self#IN_DEVELOPMENT_MODE
- let g:forms_log_file = "FORMS_LOG"
+ if filewritable(getcwd())
+ let g:forms_log_file = getcwd() . "/FORMS_LOG"
+ else
+ let g:forms_log_file = "$HOME/FORMS_LOG"
+ endif
endif
+
if ! exists("g:forms_log_enabled") || g:self#IN_DEVELOPMENT_MODE
let g:forms_log_enabled = g:self#IS_FALSE
endif
@@ -134,6 +139,11 @@ function! forms#log(msg)
execute "redir END"
endif
endfunction
+function! forms#logforce(msg)
+ execute "redir >> " . g:forms_log_file
+ silent echo a:msg
+ execute "redir END"
+endfunction
" ++++++++++++++++++++++++++++++++++++++++++++
" Gui Font: {{{1
@@ -153,14 +163,26 @@ endif
" Definitions: {{{2
" ------------------------------------------------------------
+let g:forms_reload_highlights_on_colorscheme_event = 1
+
function! s:ColorSchemeEvent()
- call s:LoadeHighlights()
+ if g:forms_reload_highlights_on_colorscheme_event
+ call s:LoadeHighlights()
+ endif
endfunction
augroup forms
autocmd ColorScheme * call s:ColorSchemeEvent()
augroup END
+function! g:ShouldLoadeHighlights()
+ if ! hlexists("ButtonHi")
+ call s:LoadeHighlights()
+ elseif synIDattr(synIDtrans(hlID("ButtonHi")), "bg") == -1
+ call s:LoadeHighlights()
+ endif
+endfunction
+
function! s:LoadeHighlights()
"========================================
@@ -169,6 +191,9 @@ function! s:LoadeHighlights()
if ! exists("g:forms_hi_light_background")
let g:forms_hi_light_background="dadada"
endif
+if ! exists("g:forms_hi_light_foreground")
+ let g:forms_hi_light_foreground="000000"
+endif
if ! exists("g:forms_hi_light_hotspot")
let g:forms_hi_light_hotspot="00ff00"
endif
@@ -218,6 +243,9 @@ endif
if ! exists("g:forms_hi_dark_background")
let g:forms_hi_dark_background="5c5c5c"
endif
+if ! exists("g:forms_hi_dark_foreground")
+ let g:forms_hi_dark_foreground="e6e6e6"
+endif
if ! exists("g:forms_hi_dark_hotspot")
let g:forms_hi_dark_hotspot="00ff00"
endif
@@ -265,6 +293,7 @@ endif
if &background == 'light'
let backgroundColor = g:forms_hi_light_background
+ let foregroundColor = g:forms_hi_light_foreground
let hotspotColor = g:forms_hi_light_hotspot
let flashColor = g:forms_hi_light_flash
let toggleselectedColor = g:forms_hi_light_toggleselected
@@ -300,6 +329,7 @@ if &background == 'light'
else " &background == 'dark'
let backgroundColor = g:forms_hi_dark_background
+ let foregroundColor = g:forms_hi_dark_foreground
let hotspotColor = g:forms_hi_dark_hotspot
let flashColor = g:forms_hi_dark_flash
let toggleselectedColor = g:forms_hi_dark_toggleselected
@@ -335,7 +365,7 @@ endif " background
if has("gui_running")
- execute "hi ReverseHi gui=reverse guibg=#" . backgroundColor
+ execute "hi ReverseHi gui=reverse guibg=#" . backgroundColor . " guifg=#" . foregroundColor
execute "hi HotSpotHi gui=NONE guibg=#" . hotspotColor
execute "hi ReverseHotSpotHi gui=reverse guibg=#" . hotspotColor
execute "hi FlashHi gui=NONE guibg=#" . flashColor
@@ -346,7 +376,7 @@ if has("gui_running")
execute "hi ButtonHi gui=NONE guibg=#" . buttonColor
execute "hi ButtonFlashHi gui=NONE guibg=#" . buttonflashColor
- execute "hi BackgroundHi gui=NONE guibg=#" . backgroundColor
+ execute "hi BackgroundHi gui=NONE guibg=#" . backgroundColor . " guifg=#" . foregroundColor
execute "hi FrameHi gui=NONE guifg=#".framefgColor." guibg=#" . framebgColor
execute "hi DropShadowHi gui=NONE guibg=#".dropshadowbgColor." guifg=#" . dropshadowfgColor
@@ -360,7 +390,9 @@ if has("gui_running")
else
let backgroundNumber = forms#color#term#ConvertRGBTxt_2_Int(backgroundColor)
- execute "hi ReverseHi cterm=reverse ctermbg=" . backgroundNumber
+ let foregroundNumber = forms#color#term#ConvertRGBTxt_2_Int(foregroundColor)
+
+ execute "hi ReverseHi cterm=reverse ctermbg=" . backgroundNumber . " ctermfg=" . foregroundNumber
let hotspotNumber = forms#color#term#ConvertRGBTxt_2_Int(hotspotColor)
execute "hi HotSpotHi cterm=NONE ctermbg=" . hotspotNumber
@@ -381,7 +413,7 @@ else
let buttonflashNumber = forms#color#term#ConvertRGBTxt_2_Int(buttonflashColor)
execute "hi ButtonFlashHi cterm=NONE ctermbg=" . buttonflashNumber
- execute "hi BackgroundHi cterm=NONE ctermbg=" . backgroundNumber
+ execute "hi BackgroundHi cterm=NONE ctermbg=" . backgroundNumber . " ctermfg=" . foregroundNumber
let framefgNumber = forms#color#term#ConvertRGBTxt_2_Int(framefgColor)
let framebgNumber = forms#color#term#ConvertRGBTxt_2_Int(framebgColor)
@@ -613,6 +645,18 @@ function! GlyphHilight(glyph, highlight, allocation)
" call forms#log("GlyphHilight: BOTTOM")
endfunction
+function! GlyphHilightPattern(glyph, highlight, pattern)
+ call GlyphDeleteHi(a:glyph)
+ let a:glyph.__matchId = matchadd(a:highlight, pattern)
+endfunction
+
+function! GlyphHilightPriority(glyph, highlight, allocation, priority)
+ call GlyphDeleteHi(a:glyph)
+
+ let pattern = GetMatchRange(a:allocation)
+ let a:glyph.__matchId = matchadd(a:highlight, pattern, a:priority)
+endfunction
+
function! AugmentGlyphHilight(glyph, highlight, allocation)
" call forms#log("AugmentGlyphHilight: TOP")
@@ -631,6 +675,18 @@ function! AugmentGlyphHilight(glyph, highlight, allocation)
" call forms#log("GlyphHilight: BOTTOM")
endfunction
+function! AugmentGlyphHilightPattern(glyph, highlight, pattern)
+ if ! has_key(a:glyph, '__matchId')
+ let a:glyph.__matchId = matchadd(a:highlight, a:pattern)
+ elseif type(a:glyph.__matchId) == g:self#LIST_TYPE
+ call add(a:glyph.__matchId, matchadd(a:highlight, a:pattern))
+ else
+ let matchId = a:glyph.__matchId
+ unlet a:glyph.__matchId
+ let a:glyph.__matchId = [matchId, matchadd(a:highlight, a:pattern)]
+ endif
+endfunction
+
" ------------------------------------------------------------
" GlyphDeleteHi: {{{2
" Delete a highlight or list of highlights associate with a
@@ -5151,7 +5207,7 @@ function! forms#loadSelectListPrototype()
if !exists("g:forms#SelectList")
let g:forms#SelectList = forms#loadLeafPrototype().clone('forms#SelectList')
let g:forms#SelectList.__size = -1
- let g:forms#SelectList.__pos = -1
+ let g:forms#SelectList.__pos = 0
let g:forms#SelectList.__on_selection_action = g:forms_Util.emptyAction()
let g:forms#SelectList.__on_deselection_action = g:forms_Util.emptyAction()
let g:forms#SelectList.__win_start = 0
@@ -5176,22 +5232,7 @@ function! forms#loadSelectListPrototype()
throw "SelectList: pos greater than number of choices: " . self.__pos
endif
- " Its initial value has been set in attrs. So, add a well-known magic
- " number to it which will serve as a clue for the first time that the
- " draw method is called that a selection should be highlighted.
- " If pos is not set but its mandatory, then set to 0 using magic value.
- " Finally, if pos is not set, then set to plain old 0.
- if self.__pos >= 0
- let self.__pos += 10000
- elseif self.__mode == 'mandatory_single'
- let self.__pos = 10000
- elseif self.__mode == 'mandatory_on_move_single'
- let self.__pos = 10000
- elseif self.__mode == 'mandatory_multiple'
- let self.__pos = 10000
- else
- let self.__pos = 0
- endif
+ call self.adjustWinStart()
return self
endfunction
@@ -5346,7 +5387,7 @@ endif
let g:forms#SelectList.handleEvent = function("FORMS_SELECT_LIST_handleEvent")
function! FORMS_SELECT_LIST_handleChar(nr) dict
-" call forms#log("g:forms#SelectList.handleChar")
+
let handled = 0
if (self.__status == g:IS_ENABLED)
let size = self.__size
@@ -5371,45 +5412,93 @@ endif
call self.flash()
else
let self.__pos += 1
+ call forms#ViewerRedrawListAdd(self)
+ endif
+" call forms#log("g:forms#SelectList.handleChar Down pos=" . self.__pos)
+ let handled = 1
+
+ elseif a:nr == "\<PageDown>" ||
+ \ a:nr == "\<S-ScrollWheelDown>" ||
+ \ a:nr == "\<C-ScrollWheelDown>"
+let nchoices = len(self.__choices)
+ if self.__pos == nchoices - 1
+ call self.flash()
+ else
+ let self.__pos += size
+ if self.__pos >= nchoices
+ let self.__pos = nchoices - 1
+ endif
if self.__mode == 'mandatory_on_move_single'
call self.handleSelection()
endif
- call forms#ViewerRedrawListAdd(self)
+ " call forms#ViewerRedrawListAdd(self)
+ endif
+ let handled = 1
+
+ elseif a:nr == "\<PageUp>" ||
+ \ a:nr == "\<S-ScrollWheelUp>" ||
+ \ a:nr == "\<C-ScrollWheelUp>"
+ if self.__pos == 0
+ call self.flash()
+ else
+ let self.__pos -= size
+ if self.__pos < 0
+ let self.__pos = 0
+ endif
+ if self.__mode == 'mandatory_on_move_single'
+ call self.handleSelection()
+ endif
+ " call forms#ViewerRedrawListAdd(self)
endif
-" call forms#log("g:forms#SelectList.handleChar Down pos=" . self.__pos)
let handled = 1
elseif c == "\<CR>" || c == "\<Space>"
-" call forms#log("g:forms#SelectList.handleChar NEW CR pos=" . self.__pos)
call self.handleSelection()
let handled = 1
endif
- let pos = (self.__pos >= 10000) ? self.__pos - 10000 : self.__pos
-
- if pos >= self.__win_start + size
- let self.__win_start += 1
- elseif self.__win_start > 0 && pos < self.__win_start
- let self.__win_start -= 1
+ let needs_redraw = self.adjustWinStart()
+ if needs_redraw
+ call forms#ViewerRedrawListAdd(self)
endif
endif
-" call forms#log("g:forms#SelectList.handleChar win_start=" . self.__win_start)
return handled
endfunction
let g:forms#SelectList.handleChar = function("FORMS_SELECT_LIST_handleChar")
+ function! FORMS_SELECT_LIST_adjustWinStart() dict
+ let needs_redraw = g:self#IS_FALSE
+ let size = self.__size
+ let pos = self.__pos
+ if size > 0
+ if pos >= self.__win_start + size
+ while pos >= self.__win_start + size
+ let self.__win_start += 1
+ let needs_redraw = g:self#IS_TRUE
+ endwhile
+ elseif self.__win_start > 0 && pos < self.__win_start
+ while self.__win_start > 0 && pos < self.__win_start
+ let self.__win_start -= 1
+ let needs_redraw = g:self#IS_TRUE
+ endwhile
+ endif
+ endif
+ return needs_redraw
+ endfunction
+ let g:forms#SelectList.adjustWinStart = function("FORMS_SELECT_LIST_adjustWinStart")
+
function! FORMS_SELECT_LIST_handleSelection() dict
-" call forms#log("g:forms#SelectList.handleSelection")
let selections = self.__selections
let pos = self.__pos
+ let win_start = self.__win_start
let slen = len(selections)
if slen == 0 " first time
" call forms#log("g:forms#SelectList.handleSelection first time")
let a = self.__allocation
let sid = GetSelectionId({
- \ 'line': a.line+pos,
+ \ 'line': a.line+pos-win_start,
\ 'column': a.column,
\ 'height': 1,
\ 'width': a.width,
@@ -5442,7 +5531,7 @@ endif
if i != pos
let a = self.__allocation
let sid = GetSelectionId({
- \ 'line': a.line+pos,
+ \ 'line': a.line+pos-win_start,
\ 'column': a.column,
\ 'height': 1,
\ 'width': a.width,
@@ -5461,7 +5550,7 @@ endif
let a = self.__allocation
let sid = GetSelectionId({
- \ 'line': a.line+pos,
+ \ 'line': a.line+pos-win_start,
\ 'column': a.column,
\ 'height': 1,
\ 'width': a.width,
@@ -5488,7 +5577,7 @@ endif
if ! found
let a = self.__allocation
let sid = GetSelectionId({
- \ 'line': a.line+pos,
+ \ 'line': a.line+pos-win_start,
\ 'column': a.column,
\ 'height': 1,
\ 'width': a.width,
@@ -5522,7 +5611,7 @@ endif
if ! found
let a = self.__allocation
let sid = GetSelectionId({
- \ 'line': a.line+pos,
+ \ 'line': a.line+pos-win_start,
\ 'column': a.column,
\ 'height': 1,
\ 'width': a.width,
@@ -5548,19 +5637,24 @@ endif
let line = a.line
let column = a.column
let width = a.width
+ let mode = self.__mode
+ let pos = self.__pos
let size = self.__size
let win_start = self.__win_start
let selections = self.__selections
let slen = len(selections)
-" call forms#log("g:forms#SelectList.draw slen=" . slen)
-" call forms#log("g:forms#SelectList.draw win_start=" . win_start)
-
- " If magic number, then pos has an initial value, so mock the entry of
- " a <CR> to highlight the position.
- if self.__pos >= 10000
- let self.__pos -= 10000
- call self.handleChar(13)
+ " first time
+ if slen == 0 && ( mode == 'mandatory_single' || mode == 'mandatory_on_move_single' || mode == 'mandatory_multiple' )
+ let sid = GetSelectionId({
+ \ 'line': a.line+pos-win_start,
+ \ 'column': a.column,
+ \ 'height': 1,
+ \ 'width': a.width,
+ \ })
+ let self.__selections = [[pos, sid]]
+ let selections = self.__selections
+ let slen = 1
endif
let nos_choices = len(self.__choices)
@@ -5590,7 +5684,6 @@ endif
call forms#SetStringAt(blankStr, line+cnt, column+tlen)
endif
endif
-
let cnt += 1
endwhile
@@ -5599,7 +5692,7 @@ endif
let max_idx = min_idx + endcnt
if slen > 0
- if self.__mode == 'single' || self.__mode == 'mandatory_single' || self.__mode == 'mandatory_on_move_single'
+ if mode == 'single' || mode == 'mandatory_single' || mode == 'mandatory_on_move_single'
let [idx, sid] = selections[0]
call ClearSelectionId(sid)
if idx >= min_idx && idx < max_idx
@@ -5702,33 +5795,38 @@ function! forms#loadPopDownListPrototype()
throw "PopDownList: pos greater than number of choices: " . self.__pos
endif
- function! CBAction(...) dict
-" call forms#log("CBAction.execute: pos=" . self.pos)
- if self.popdownlist.__pos != self.pos
- let self.popdownlist.__pos = self.pos
- " call self.popdownlist.__on_selection_action.execute(self.pos)
- " call forms#ViewerRedrawListAdd(self.popdownlist)
+ if has_key(a:attrs, "size")
+ let sl_size = a:attrs["size"]
+ if type(sl_size) != g:self#NUMBER_TYPE
+ throw "PopDownList: size not NUMBER: " . sl_size
+ endif
+ else
+ let sl_size = len(self.__choices)
+ endif
+
+ let max_size = winheight(0) - 4
+ if max_size <= sl_size
+ let sl_size = max_size
+ endif
+
+ function! SLAction(...) dict
+ let pos = a:1
+ if self.popdownlist.__pos != pos
+ let self.popdownlist.__pos = pos
endif
call forms#AppendInput({ 'type': 'Exit' })
endfunction
+ let sl_action = forms#newAction({ 'execute': function("SLAction")})
+ let sl_action.popdownlist = self
+
+ let attrs = { 'mode': 'mandatory_single',
+ \ 'choices': self.__choices,
+ \ 'size': sl_size,
+ \ 'pos': self.__pos,
+ \ 'on_selection_action': sl_action
+ \ }
- let items = []
- let cnt = 0
- for choice in self.__choices
- let [label, id] = choice
- let action = forms#newAction({ 'execute': function("CBAction")})
- let action.pos = cnt
- let action.popdownlist = self
-
- call add(items, { 'type': 'button',
- \ 'label': label,
- \ 'highlight': 0,
- \ 'action': action
- \ })
- let cnt += 1
- endfor
- let attrs = {'items': items}
- let self.__menu = forms#newMenu(attrs)
+ let self.__slist = forms#newSelectList(attrs)
return self
endfunction
@@ -5740,8 +5838,8 @@ function! forms#loadPopDownListPrototype()
let self.__pos = 0
let self.__on_selection_action = g:forms_Util.emptyAction()
let self.__choices = []
- call self.__menu.delete()
- unlet self.__menu
+ call self.__slist.delete()
+ unlet self.__slist
call call(g:forms#Leaf.reinit, [a:attrs], self)
endfunction
@@ -5800,7 +5898,6 @@ function! forms#loadPopDownListPrototype()
let g:forms#PopDownList.selection = function("FORMS_POP_DOWN_LIST_selection")
function! FORMS_POP_DOWN_LIST_handleEvent(event) dict
-" call forms#log("g:forms#PopDownList.handleEvent event=" . string(a:event))
if (self.__status == g:IS_ENABLED)
let type = a:event.type
if type == 'Select'
@@ -5814,36 +5911,33 @@ function! forms#loadPopDownListPrototype()
let g:forms#PopDownList.handleEvent = function("FORMS_POP_DOWN_LIST_handleEvent")
function! FORMS_POP_DOWN_LIST_handleChar(nr) dict
-" call forms#log("g:forms#PopDownList.handleChar")
let handled = 0
if (self.__status == g:IS_ENABLED)
" call forms#log("g:forms#PopDownList.handleChar: nr=". a:nr)
let c = nr2char(a:nr)
if c == "\<CR>" || c == "\<Space>"
-" call forms#log("g:forms#PopDownList.handleChar NEW CR pos=" . self.__pos)
call self.handleSelection()
let handled = 1
endif
endif
-" call forms#log("g:forms#PopDownList.handleChar win_start=" . self.__win_start)
return handled
endfunction
let g:forms#PopDownList.handleChar = function("FORMS_POP_DOWN_LIST_handleChar")
function! FORMS_POP_DOWN_LIST_handleSelection() dict
-"call forms#log("g:forms#PopDownList.handleSelection: TOP")
let pos = self.__pos
let a = self.__allocation
"call forms#log("g:forms#PopDownList.handleSelection: a=".string(a))
let line = a.line
let column = a.column
- let menu = self.__menu
+ let slist = self.__slist
let y_screen = line+1 -s:form_top_screen_line
+ let box = forms#newBox({ 'body': slist })
let attrs = {
\ 'x_screen': column,
\ 'y_screen': y_screen,
\ 'delete': 0,
- \ 'body': menu
+ \ 'body': box
\ }
let form = forms#newForm(attrs)
function! form.purpose() dict
@@ -5852,17 +5946,15 @@ function! forms#loadPopDownListPrototype()
\ ]
endfunction
call form.run()
+
if pos != self.__pos
-"call forms#log("g:forms#PopDownList.handleSelection: CHANGE")
call self.__on_selection_action.execute(self.__pos)
call forms#ViewerRedrawListAdd(self)
endif
-"call forms#log("g:forms#PopDownList.handleSelection: BOTTOM")
endfunction
let g:forms#PopDownList.handleSelection = function("FORMS_POP_DOWN_LIST_handleSelection")
function! FORMS_POP_DOWN_LIST_draw(allocation) dict
-"call forms#log("g:forms#PopDownList.draw" . string(a:allocation))
let self.__allocation = a:allocation
let a = a:allocation
@@ -7012,14 +7104,12 @@ function! forms#loadMonoPrototype()
let g:forms#Mono.reinit = function("FORMS_MONO_reinit")
function! FORMS_MONO_delete(...) dict
-" call forms#log("Mono.delete: TOP")
if has_key(self.__body, 'delete')
call self.__body.delete()
endif
let p = g:forms#Mono._prototype
call call(p.delete, [p], self)
-" call forms#log("Mono.delete: BOTTOM")
endfunction
let g:forms#Mono.delete = function("FORMS_MONO_delete")
@@ -7629,6 +7719,7 @@ endfunction
"
" attributes
" char : character to use to draw border (default ' ')
+" group : highligh group (default: "BackgroundHi")
"---------------------------------------------------------------------------
if g:self#IN_DEVELOPMENT_MODE
if exists("g:forms#Background")
@@ -7639,6 +7730,7 @@ function! forms#loadBackgroundPrototype()
if !exists("g:forms#Background")
let g:forms#Background = forms#loadMonoPrototype().clone('forms#Background')
let g:forms#Background.__char = ' '
+ let g:forms#Background.__group = "BackgroundHi"
function! FORMS_BACKGROUND_init(attrs) dict
"call forms#log("forms#Background.init TOP")
@@ -7659,13 +7751,16 @@ function! forms#loadBackgroundPrototype()
function! FORMS_BACKGROUND_reinit(attrs) dict
"call forms#log("g:forms#Background.reinit TOP")
let oldChar = self.__char
+ let oldGroup = self.__group
let self.__char = ' '
call call(g:forms#Mono.reinit, [a:attrs], self)
if oldChar != self.__char
call forms#ViewerRedrawListAdd(self)
+ elseif oldGroup != self.__group
+ call forms#ViewerRedrawListAdd(self)
endif
endfunction
let g:forms#Background.reinit = function("FORMS_BACKGROUND_reinit")
@@ -7704,7 +7799,7 @@ function! forms#loadBackgroundPrototype()
endwhile
endif
- call GlyphHilight(self, "BackgroundHi", a)
+ call GlyphHilight(self, self.__group, a)
call self.__body.draw(a)
endif
if self.__status == g:IS_DISABLED
@@ -8162,7 +8257,7 @@ endfunction
"---------------------------------------------------------------------------
" HVAlign <- Mono: {{{2
"---------------------------------------------------------------------------
-" Mono that horizontallly and vertically aligns body
+" Mono that horizontally and vertically aligns body
" horizontal: float align 0-1 or 'L' 'C' 'R'
" vertical: float align 0-1 or 'T' 'C' 'B'
" It is the same width as its body and does no horizontal alignments
@@ -8773,7 +8868,6 @@ function! forms#loadViewerPrototype()
let g:forms#Viewer.mapInput = function("FORMS_VIEWER_mapInput")
function! FORMS_VIEWER_handleEvent(event) dict
-" call forms#log("g:forms#Viewer.handleEvent: " . string(a:event))
if (self.__status == g:IS_ENABLED)
let type = a:event.type
if type == 'Select'
@@ -8785,15 +8879,27 @@ function! forms#loadViewerPrototype()
call self.run()
return 1
elseif type == 'ReDrawAll'
- call self.__body.draw({
- \ 'line': a.line,
- \ 'column': a.column,
- \ 'width': a.width,
- \ 'height': a.height
- \ })
+ if self.isKindOf("forms#Form")
+ let a = self.__allocation
+ call self.__body.draw({
+ \ 'line': a.line,
+ \ 'column': a.column,
+ \ 'width': a.width,
+ \ 'height': a.height
+ \ })
+ redraw
+ else
+ let vstackdepth = forms#ViewerStackDepth()
+ if vstackdepth > 1
+ let parentViewer = forms#ViewerStackPeek(vstackdepth)
+ call parentViewer.handleEvent(a:event)
+ else
+echo "ERROR g:forms#Viewer.handleEvent Top Viewer is NOT FORM")
+ endif
+ endif
" call focus.hotspot()
- redraw
return 1
+
elseif type == 'ReDraw'
" call focus.redraw()
" call focus.hotspot()
@@ -9187,9 +9293,11 @@ endif
elseif type == 'Sleep'
let time = event.time
-" call forms#log("g:forms#Viewer.run Sleep time=".time)
execute 'sleep '.time
+ elseif type == 'ReDrawAll'
+ call self.handleEvent(event)
+
else
if exists('focus')
if focus.handleEvent(event)
@@ -9227,7 +9335,6 @@ endif
if exists('focus')
if focus.handleChar(nr)
for w in forms#ViewerRedrawListCopyAndClear()
-" call forms#log("g:forms#Viewer.run call c redraw")
call w.redraw()
endfor
call focus.hotspot()
@@ -9324,6 +9431,8 @@ endfunction
" default is 'C'
"---------------------------------------------------------------------------
+let s:form_save_readonly=&readonly
+
if exists("s:form_top_screen_line")
unlet s:form_top_screen_line
endif
@@ -9398,6 +9507,8 @@ function! forms#loadFormPrototype()
function! FORMS_FORM_run() dict
"call forms#log("g:forms#Form.run TOP")
+ call g:ShouldLoadeHighlights()
+
"==============================================
" Capture environment
"==============================================
@@ -9452,16 +9563,23 @@ function! forms#loadFormPrototype()
" get winline after nowrap is set
let s:form_winline = winline()
+ if s:form_save_readonly
+ set noreadonly
+ endif
+
" Make sure the undo list is not empty
" This is undone after the undofile is read at bottom
- " execute ":normal Go"
execute ":normal G$a "
let undof = tempname()
" let undof = undofile("xx")
-"call forms#log("g:forms#Form wundo undof=" . undof)
execute "wundo " . undof
+if 0
+ " change tabs to spaces
+ execute "g/ /s// /g"
+endif
+
endif
let l:top_screen_line = s:form_top_screen_line
@@ -9616,7 +9734,7 @@ function! forms#loadFormPrototype()
let l:nosLinesToSave = formHeight
let l:nosLinesToAdd = 0
elseif totalLinesBuffer < l:lineStartOfFormBuffer " partial case
-" call forms#log("g:forms#Form case=partial")
+"call forms#log("g:forms#Form case=partial")
let l:nosLinesToSave = 0
let l:nosLinesToAdd = formHeight + (l:lineStartOfFormBuffer - totalLinesBuffer)
elseif totalLinesBuffer == 1 " one case
@@ -9660,11 +9778,11 @@ function! forms#loadFormPrototype()
let clineLen = strchars(cline)
let diff = l:columnEndOfFormScreen - clineLen
if diff > 0
-" call forms#log("g:forms#Form diff > 0")
+"call forms#log("g:forms#Form diff > 0")
call cursor(pos, clineLen)
execute ":normal " . diff . 'A' . ' '
elseif l:winWidth < clineLen
-" call forms#log("g:forms#Form LINE TOO LONG: " . cline)
+"call forms#log("g:forms#Form LINE TOO LONG: " . cline)
call cursor(pos, l:winWidth)
execute ":normal D"
endif
@@ -9771,7 +9889,7 @@ function! forms#loadFormPrototype()
throw "Forms: " . v:exception . " at " . v:throwpoint
endif
finally
-" call forms#log("g:forms#Form outer finally")
+"call forms#log("g:forms#Form outer finally")
"==============================================
" Automatic Delete of Form body
@@ -9824,12 +9942,14 @@ function! forms#loadFormPrototype()
if forms#ViewerStackDepth() == 0
try
-" call forms#log("g:forms#Form rundo undof=" . undof)
silent execute "rundo " . undof
silent call delete(undof)
-
- " Now, undo the operation done before undo write was done
execute ":normal u"
+
+ if s:form_save_readonly
+ set readonly
+ endif
+
catch /.*/
" do nothing
endtry
@@ -10480,7 +10600,6 @@ function! forms#loadVPolyPrototype()
let g:forms#VPoly.drawBoxes = function("FORMS_VPOLY_drawBoxes")
function! FORMS_VPOLY_draw(allocation) dict
-" call forms#log("g:forms#VPoly.draw" . string(a:allocation))
let self.__allocation = a:allocation
let a = a:allocation
@@ -10492,9 +10611,6 @@ function! forms#loadVPolyPrototype()
let size = self.__size
let win_start = self.__win_start
let alignments = self.__alignments
-" call forms#log("g:forms#VPoly.draw: size=".size)
-" call forms#log("g:forms#VPoly.draw: win_start=".win_start)
-" call forms#log("g:forms#VPoly.draw: alignments=".string(alignments))
let char = ''
let children = self.__children
let children_request_size = self.__children_request_size
@@ -10506,7 +10622,6 @@ function! forms#loadVPolyPrototype()
let l:y = bdelta
let nos_children = len(children)
-" call forms#log("g:forms#VPoly.draw: nos_children=".nos_children)
if size > 0 && nos_children > size
let endcnt = size
@@ -12244,7 +12359,6 @@ function! forms#loadMenuPrototype()
elseif a:nr == "\<PageDown>" ||
\ a:nr == "\<S-ScrollWheelDown>" ||
\ a:nr == "\<C-ScrollWheelDown>"
-" call forms#log("g:forms#Menu.handleChar PageDown pos=" . self.__pos)
call self.doPageDown()
let handled = 1
@@ -15524,12 +15638,27 @@ function! forms#SetStringAt(str, line, column)
let slen2 = strlen(s)
if slen == slen2
" there are no multi-byte characters
+if 1
+ exe a:line
+ let c = a:column
+
+ if c <= 1
+ exe "norm! 0r".s[0]
+ let s = s[1:]
+ let slen -= 1
+ let c += 1
+ endif
+
+ exe "norm! 0".(c-1)."l".slen."s".s.''
+
+else
let cnt = 0
while cnt < slen
call forms#SetCharAt(s[cnt], a:line, a:column+cnt)
let cnt += 1
endwhile
+endif
else
" multibyte characters, must do some ugly work
let cnt = 0
View
1,031 autoload/forms/color/util.vim
@@ -855,6 +855,1037 @@ function! forms#color#util#DoubleContrastRGBusingHSV(shift, rn, gn, bn)
\ forms#color#util#ConvertHSV2RGB(halfminusHue,s,v)]
endfunction
+" map from names to rgb numbers
+let s:Name_2_RGB = {}
+let s:Name_2_RGB['snow'] = 'fffafa'
+let s:Name_2_RGB['ghost white'] = 'f8f8ff'
+let s:Name_2_RGB['GhostWhite'] = 'f8f8ff'
+let s:Name_2_RGB['ghostwhite'] = 'f8f8ff'
+let s:Name_2_RGB['white smoke'] = 'f5f5f5'
+let s:Name_2_RGB['WhiteSmoke'] = 'f5f5f5'
+let s:Name_2_RGB['whitesmoke'] = 'f5f5f5'
+let s:Name_2_RGB['gainsboro'] = 'dcdcdc'
+let s:Name_2_RGB['floral white'] = 'fffaf0'
+let s:Name_2_RGB['FloralWhite'] = 'fffaf0'
+let s:Name_2_RGB['floralwhite'] = 'fffaf0'
+let s:Name_2_RGB['old lace'] = 'fdf5e6'
+let s:Name_2_RGB['OldLace'] = 'fdf5e6'
+let s:Name_2_RGB['oldlace'] = 'fdf5e6'
+let s:Name_2_RGB['linen'] = 'faf0e6'
+let s:Name_2_RGB['antique white'] = 'faebd7'
+let s:Name_2_RGB['AntiqueWhite'] = 'faebd7'
+let s:Name_2_RGB['antiquewhite'] = 'faebd7'
+let s:Name_2_RGB['papaya whip'] = 'ffefd5'
+let s:Name_2_RGB['PapayaWhip'] = 'ffefd5'
+let s:Name_2_RGB['papayawhip'] = 'ffefd5'
+let s:Name_2_RGB['blanched almond'] = 'ffebcd'
+let s:Name_2_RGB['BlanchedAlmond'] = 'ffebcd'
+let s:Name_2_RGB['blanchedalmond'] = 'ffebcd'
+let s:Name_2_RGB['bisque'] = 'ffe4c4'
+let s:Name_2_RGB['peach puff'] = 'ffdab9'
+let s:Name_2_RGB['PeachPuff'] = 'ffdab9'
+let s:Name_2_RGB['peachpuff'] = 'ffdab9'
+let s:Name_2_RGB['navajo white'] = 'ffdead'
+let s:Name_2_RGB['NavajoWhite'] = 'ffdead'
+let s:Name_2_RGB['navajowhite'] = 'ffdead'
+let s:Name_2_RGB['moccasin'] = 'ffe4b5'
+let s:Name_2_RGB['cornsilk'] = 'fff8dc'
+let s:Name_2_RGB['ivory'] = 'fffff0'
+let s:Name_2_RGB['lemon chiffon'] = 'fffacd'
+let s:Name_2_RGB['LemonChiffon'] = 'fffacd'
+let s:Name_2_RGB['lemonchiffon'] = 'fffacd'
+let s:Name_2_RGB['seashell'] = 'fff5ee'
+let s:Name_2_RGB['honeydew'] = 'f0fff0'
+let s:Name_2_RGB['mint cream'] = 'f5fffa'
+let s:Name_2_RGB['MintCream'] = 'f5fffa'
+let s:Name_2_RGB['mintcream'] = 'f5fffa'
+let s:Name_2_RGB['azure'] = 'f0ffff'
+let s:Name_2_RGB['alice blue'] = 'f0f8ff'
+let s:Name_2_RGB['AliceBlue'] = 'f0f8ff'
+let s:Name_2_RGB['aliceblue'] = 'f0f8ff'
+let s:Name_2_RGB['lavender'] = 'e6e6fa'
+let s:Name_2_RGB['lavender blush'] = 'fff0f5'
+let s:Name_2_RGB['LavenderBlush'] = 'fff0f5'
+let s:Name_2_RGB['lavenderblush'] = 'fff0f5'
+let s:Name_2_RGB['misty rose'] = 'ffe4e1'
+let s:Name_2_RGB['MistyRose'] = 'ffe4e1'
+let s:Name_2_RGB['mistyrose'] = 'ffe4e1'
+let s:Name_2_RGB['white'] = 'ffffff'
+let s:Name_2_RGB['black'] = '000000'
+let s:Name_2_RGB['dark slate gray'] = '2f4f4f'
+let s:Name_2_RGB['DarkSlateGray'] = '2f4f4f'
+let s:Name_2_RGB['darkslategray'] = '2f4f4f'
+let s:Name_2_RGB['dark slate grey'] = '2f4f4f'
+let s:Name_2_RGB['DarkSlateGrey'] = '2f4f4f'
+let s:Name_2_RGB['darkslategrey'] = '2f4f4f'
+let s:Name_2_RGB['dim gray'] = '696969'
+let s:Name_2_RGB['DimGray'] = '696969'
+let s:Name_2_RGB['dimgray'] = '696969'
+let s:Name_2_RGB['dim grey'] = '696969'
+let s:Name_2_RGB['DimGrey'] = '696969'
+let s:Name_2_RGB['dimgrey'] = '696969'
+let s:Name_2_RGB['slate gray'] = '708090'
+let s:Name_2_RGB['SlateGray'] = '708090'
+let s:Name_2_RGB['slategray'] = '708090'
+let s:Name_2_RGB['slate grey'] = '708090'
+let s:Name_2_RGB['SlateGrey'] = '708090'
+let s:Name_2_RGB['slategrey'] = '708090'
+let s:Name_2_RGB['light slate gray'] = '778899'
+let s:Name_2_RGB['LightSlateGray'] = '778899'
+let s:Name_2_RGB['lightslategray'] = '778899'
+let s:Name_2_RGB['light slate grey'] = '778899'
+let s:Name_2_RGB['LightSlateGrey'] = '778899'
+let s:Name_2_RGB['lightslategrey'] = '778899'
+let s:Name_2_RGB['gray'] = 'bebebe'
+let s:Name_2_RGB['grey'] = 'bebebe'
+let s:Name_2_RGB['light grey'] = 'd3d3d3'
+let s:Name_2_RGB['LightGrey'] = 'd3d3d3'
+let s:Name_2_RGB['lightgrey'] = 'd3d3d3'
+let s:Name_2_RGB['light gray'] = 'd3d3d3'
+let s:Name_2_RGB['LightGray'] = 'd3d3d3'
+let s:Name_2_RGB['lightgray'] = 'd3d3d3'
+let s:Name_2_RGB['midnight blue'] = '191970'
+let s:Name_2_RGB['MidnightBlue'] = '191970'
+let s:Name_2_RGB['midnightblue'] = '191970'
+let s:Name_2_RGB['navy'] = '000080'
+let s:Name_2_RGB['navy blue'] = '000080'
+let s:Name_2_RGB['NavyBlue'] = '000080'
+let s:Name_2_RGB['navyblue'] = '000080'
+let s:Name_2_RGB['cornflower blue'] = '6495ed'
+let s:Name_2_RGB['CornflowerBlue'] = '6495ed'
+let s:Name_2_RGB['cornflowerblue'] = '6495ed'
+let s:Name_2_RGB['dark slate blue'] = '483d8b'
+let s:Name_2_RGB['DarkSlateBlue'] = '483d8b'
+let s:Name_2_RGB['darkslateblue'] = '483d8b'
+let s:Name_2_RGB['slate blue'] = '6a5acd'
+let s:Name_2_RGB['SlateBlue'] = '6a5acd'
+let s:Name_2_RGB['slateblue'] = '6a5acd'
+let s:Name_2_RGB['medium slate blue'] = '7b68ee'
+let s:Name_2_RGB['MediumSlateBlue'] = '7b68ee'
+let s:Name_2_RGB['mediumslateblue'] = '7b68ee'
+let s:Name_2_RGB['light slate blue'] = '8470ff'
+let s:Name_2_RGB['LightSlateBlue'] = '8470ff'
+let s:Name_2_RGB['lightslateblue'] = '8470ff'
+let s:Name_2_RGB['medium blue'] = '0000cd'
+let s:Name_2_RGB['MediumBlue'] = '0000cd'
+let s:Name_2_RGB['mediumblue'] = '0000cd'
+let s:Name_2_RGB['royal blue'] = '4169e1'
+let s:Name_2_RGB['RoyalBlue'] = '4169e1'
+let s:Name_2_RGB['royalblue'] = '4169e1'
+let s:Name_2_RGB['blue'] = '0000ff'
+let s:Name_2_RGB['dodger blue'] = '1e90ff'
+let s:Name_2_RGB['DodgerBlue'] = '1e90ff'
+let s:Name_2_RGB['dodgerblue'] = '1e90ff'
+let s:Name_2_RGB['deep sky blue'] = '00bfff'
+let s:Name_2_RGB['DeepSkyBlue'] = '00bfff'
+let s:Name_2_RGB['deepskyblue'] = '00bfff'
+let s:Name_2_RGB['sky blue'] = '87ceeb'
+let s:Name_2_RGB['SkyBlue'] = '87ceeb'
+let s:Name_2_RGB['skyblue'] = '87ceeb'
+let s:Name_2_RGB['light sky blue'] = '87cefa'
+let s:Name_2_RGB['LightSkyBlue'] = '87cefa'
+let s:Name_2_RGB['lightskyblue'] = '87cefa'
+let s:Name_2_RGB['steel blue'] = '4682b4'
+let s:Name_2_RGB['SteelBlue'] = '4682b4'
+let s:Name_2_RGB['steelblue'] = '4682b4'
+let s:Name_2_RGB['light steel blue'] = 'b0c4de'
+let s:Name_2_RGB['LightSteelBlue'] = 'b0c4de'
+let s:Name_2_RGB['lightsteelblue'] = 'b0c4de'
+let s:Name_2_RGB['light blue'] = 'add8e6'
+let s:Name_2_RGB['LightBlue'] = 'add8e6'
+let s:Name_2_RGB['lightblue'] = 'add8e6'
+let s:Name_2_RGB['powder blue'] = 'b0e0e6'
+let s:Name_2_RGB['PowderBlue'] = 'b0e0e6'
+let s:Name_2_RGB['powderblue'] = 'b0e0e6'
+let s:Name_2_RGB['pale turquoise'] = 'afeeee'
+let s:Name_2_RGB['PaleTurquoise'] = 'afeeee'
+let s:Name_2_RGB['paleturquoise'] = 'afeeee'
+let s:Name_2_RGB['dark turquoise'] = '00ced1'
+let s:Name_2_RGB['DarkTurquoise'] = '00ced1'
+let s:Name_2_RGB['darkturquoise'] = '00ced1'
+let s:Name_2_RGB['medium turquoise'] = '48d1cc'
+let s:Name_2_RGB['MediumTurquoise'] = '48d1cc'
+let s:Name_2_RGB['mediumturquoise'] = '48d1cc'
+let s:Name_2_RGB['turquoise'] = '40e0d0'
+let s:Name_2_RGB['cyan'] = '00ffff'
+let s:Name_2_RGB['light cyan'] = 'e0ffff'
+let s:Name_2_RGB['LightCyan'] = 'e0ffff'
+let s:Name_2_RGB['lightcyan'] = 'e0ffff'
+let s:Name_2_RGB['cadet blue'] = '5f9ea0'
+let s:Name_2_RGB['CadetBlue'] = '5f9ea0'
+let s:Name_2_RGB['cadetblue'] = '5f9ea0'
+let s:Name_2_RGB['medium aquamarine'] = '66cdaa'
+let s:Name_2_RGB['MediumAquamarine'] = '66cdaa'
+let s:Name_2_RGB['mediumaquamarine'] = '66cdaa'
+let s:Name_2_RGB['aquamarine'] = '7fffd4'
+let s:Name_2_RGB['dark green'] = '006400'
+let s:Name_2_RGB['DarkGreen'] = '006400'
+let s:Name_2_RGB['darkgreen'] = '006400'
+let s:Name_2_RGB['dark olive green'] = '556b2f'
+let s:Name_2_RGB['DarkOliveGreen'] = '556b2f'
+let s:Name_2_RGB['darkolivegreen'] = '556b2f'
+let s:Name_2_RGB['dark sea green'] = '8fbc8f'
+let s:Name_2_RGB['DarkSeaGreen'] = '8fbc8f'
+let s:Name_2_RGB['darkseagreen'] = '8fbc8f'
+let s:Name_2_RGB['sea green'] = '2e8b57'
+let s:Name_2_RGB['SeaGreen'] = '2e8b57'
+let s:Name_2_RGB['seagreen'] = '2e8b57'
+let s:Name_2_RGB['medium sea green'] = '3cb371'
+let s:Name_2_RGB['MediumSeaGreen'] = '3cb371'
+let s:Name_2_RGB['mediumseagreen'] = '3cb371'
+let s:Name_2_RGB['light sea green'] = '20b2aa'
+let s:Name_2_RGB['LightSeaGreen'] = '20b2aa'
+let s:Name_2_RGB['lightseagreen'] = '20b2aa'
+let s:Name_2_RGB['pale green'] = '98fb98'
+let s:Name_2_RGB['PaleGreen'] = '98fb98'
+let s:Name_2_RGB['palegreen'] = '98fb98'
+let s:Name_2_RGB['spring green'] = '00ff7f'
+let s:Name_2_RGB['SpringGreen'] = '00ff7f'
+let s:Name_2_RGB['springgreen'] = '00ff7f'
+let s:Name_2_RGB['lawn green'] = '7cfc00'
+let s:Name_2_RGB['LawnGreen'] = '7cfc00'
+let s:Name_2_RGB['lawngreen'] = '7cfc00'
+let s:Name_2_RGB['green'] = '00ff00'
+let s:Name_2_RGB['chartreuse'] = '7fff00'
+let s:Name_2_RGB['medium spring green'] = '00fa9a'
+let s:Name_2_RGB['MediumSpringGreen'] = '00fa9a'
+let s:Name_2_RGB['mediumspringgreen'] = '00fa9a'
+let s:Name_2_RGB['green yellow'] = 'adff2f'
+let s:Name_2_RGB['GreenYellow'] = 'adff2f'
+let s:Name_2_RGB['greenyellow'] = 'adff2f'
+let s:Name_2_RGB['lime green'] = '32cd32'
+let s:Name_2_RGB['LimeGreen'] = '32cd32'
+let s:Name_2_RGB['limegreen'] = '32cd32'
+let s:Name_2_RGB['yellow green'] = '9acd32'
+let s:Name_2_RGB['YellowGreen'] = '9acd32'
+let s:Name_2_RGB['yellowgreen'] = '9acd32'
+let s:Name_2_RGB['forest green'] = '228b22'
+let s:Name_2_RGB['ForestGreen'] = '228b22'
+let s:Name_2_RGB['forestgreen'] = '228b22'
+let s:Name_2_RGB['olive drab'] = '6b8e23'
+let s:Name_2_RGB['OliveDrab'] = '6b8e23'
+let s:Name_2_RGB['olivedrab'] = '6b8e23'
+let s:Name_2_RGB['dark khaki'] = 'bdb76b'
+let s:Name_2_RGB['DarkKhaki'] = 'bdb76b'
+let s:Name_2_RGB['darkkhaki'] = 'bdb76b'
+let s:Name_2_RGB['khaki'] = 'f0e68c'
+let s:Name_2_RGB['pale goldenrod'] = 'eee8aa'
+let s:Name_2_RGB['PaleGoldenrod'] = 'eee8aa'
+let s:Name_2_RGB['palegoldenrod'] = 'eee8aa'
+let s:Name_2_RGB['light goldenrod yellow'] = 'fafad2'
+let s:Name_2_RGB['LightGoldenrodYellow'] = 'fafad2'
+let s:Name_2_RGB['lightgoldenrodyellow'] = 'fafad2'
+let s:Name_2_RGB['light yellow'] = 'ffffe0'
+let s:Name_2_RGB['LightYellow'] = 'ffffe0'
+let s:Name_2_RGB['lightyellow'] = 'ffffe0'
+let s:Name_2_RGB['yellow'] = 'ffff00'
+let s:Name_2_RGB['gold'] = 'ffd700'
+let s:Name_2_RGB['light goldenrod'] = 'eedd82'
+let s:Name_2_RGB['LightGoldenrod'] = 'eedd82'
+let s:Name_2_RGB['lightgoldenrod'] = 'eedd82'
+let s:Name_2_RGB['goldenrod'] = 'daa520'
+let s:Name_2_RGB['dark goldenrod'] = 'b8860b'
+let s:Name_2_RGB['DarkGoldenrod'] = 'b8860b'
+let s:Name_2_RGB['darkgoldenrod'] = 'b8860b'
+let s:Name_2_RGB['rosy brown'] = 'bc8f8f'
+let s:Name_2_RGB['RosyBrown'] = 'bc8f8f'
+let s:Name_2_RGB['rosybrown'] = 'bc8f8f'
+let s:Name_2_RGB['indian red'] = 'cd5c5c'
+let s:Name_2_RGB['IndianRed'] = 'cd5c5c'
+let s:Name_2_RGB['indianred'] = 'cd5c5c'
+let s:Name_2_RGB['saddle brown'] = '8b4513'
+let s:Name_2_RGB['SaddleBrown'] = '8b4513'
+let s:Name_2_RGB['saddlebrown'] = '8b4513'
+let s:Name_2_RGB['sienna'] = 'a0522d'
+let s:Name_2_RGB['peru'] = 'cd853f'
+let s:Name_2_RGB['burlywood'] = 'deb887'
+let s:Name_2_RGB['beige'] = 'f5f5dc'
+let s:Name_2_RGB['wheat'] = 'f5deb3'
+let s:Name_2_RGB['sandy brown'] = 'f4a460'
+let s:Name_2_RGB['SandyBrown'] = 'f4a460'
+let s:Name_2_RGB['sandybrown'] = 'f4a460'
+let s:Name_2_RGB['tan'] = 'd2b48c'
+let s:Name_2_RGB['chocolate'] = 'd2691e'
+let s:Name_2_RGB['firebrick'] = 'b22222'
+let s:Name_2_RGB['brown'] = 'a52a2a'
+let s:Name_2_RGB['dark salmon'] = 'e9967a'
+let s:Name_2_RGB['DarkSalmon'] = 'e9967a'
+let s:Name_2_RGB['darksalmon'] = 'e9967a'
+let s:Name_2_RGB['salmon'] = 'fa8072'
+let s:Name_2_RGB['light salmon'] = 'ffa07a'
+let s:Name_2_RGB['LightSalmon'] = 'ffa07a'
+let s:Name_2_RGB['lightsalmon'] = 'ffa07a'
+let s:Name_2_RGB['orange'] = 'ffa500'
+let s:Name_2_RGB['dark orange'] = 'ff8c00'
+let s:Name_2_RGB['DarkOrange'] = 'ff8c00'
+let s:Name_2_RGB['darkorange'] = 'ff8c00'
+let s:Name_2_RGB['coral'] = 'ff7f50'
+let s:Name_2_RGB['light coral'] = 'f08080'
+let s:Name_2_RGB['LightCoral'] = 'f08080'
+let s:Name_2_RGB['lightcoral'] = 'f08080'
+let s:Name_2_RGB['tomato'] = 'ff6347'
+let s:Name_2_RGB['orange red'] = 'ff4500'
+let s:Name_2_RGB['OrangeRed'] = 'ff4500'
+let s:Name_2_RGB['orangered'] = 'ff4500'
+let s:Name_2_RGB['red'] = 'ff0000'
+let s:Name_2_RGB['hot pink'] = 'ff69b4'
+let s:Name_2_RGB['HotPink'] = 'ff69b4'
+let s:Name_2_RGB['hotpink'] = 'ff69b4'
+let s:Name_2_RGB['deep pink'] = 'ff1493'
+let s:Name_2_RGB['DeepPink'] = 'ff1493'
+let s:Name_2_RGB['deeppink'] = 'ff1493'
+let s:Name_2_RGB['pink'] = 'ffc0cb'
+let s:Name_2_RGB['light pink'] = 'ffb6c1'
+let s:Name_2_RGB['LightPink'] = 'ffb6c1'
+let s:Name_2_RGB['lightpink'] = 'ffb6c1'
+let s:Name_2_RGB['pale violet red'] = 'db7093'
+let s:Name_2_RGB['PaleVioletRed'] = 'db7093'
+let s:Name_2_RGB['palevioletred'] = 'db7093'
+let s:Name_2_RGB['maroon'] = 'b03060'
+let s:Name_2_RGB['medium violet red'] = 'c71585'
+let s:Name_2_RGB['MediumVioletRed'] = 'c71585'
+let s:Name_2_RGB['mediumvioletred'] = 'c71585'
+let s:Name_2_RGB['violet red'] = 'd02090'
+let s:Name_2_RGB['VioletRed'] = 'd02090'
+let s:Name_2_RGB['violetred'] = 'd02090'
+let s:Name_2_RGB['magenta'] = 'ff00ff'
+let s:Name_2_RGB['violet'] = 'ee82ee'
+let s:Name_2_RGB['plum'] = 'dda0dd'
+let s:Name_2_RGB['orchid'] = 'da70d6'
+let s:Name_2_RGB['medium orchid'] = 'ba55d3'
+let s:Name_2_RGB['MediumOrchid'] = 'ba55d3'
+let s:Name_2_RGB['mediumorchid'] = 'ba55d3'
+let s:Name_2_RGB['dark orchid'] = '9932cc'
+let s:Name_2_RGB['DarkOrchid'] = '9932cc'
+let s:Name_2_RGB['darkorchid'] = '9932cc'
+let s:Name_2_RGB['dark violet'] = '9400d3'
+let s:Name_2_RGB['DarkViolet'] = '9400d3'
+let s:Name_2_RGB['darkviolet'] = '9400d3'
+let s:Name_2_RGB['blue violet'] = '8a2be2'
+let s:Name_2_RGB['BlueViolet'] = '8a2be2'
+let s:Name_2_RGB['blueviolet'] = '8a2be2'
+let s:Name_2_RGB['purple'] = 'a020f0'
+let s:Name_2_RGB['medium purple'] = '9370db'
+let s:Name_2_RGB['MediumPurple'] = '9370db'
+let s:Name_2_RGB['mediumpurple'] = '9370db'
+let s:Name_2_RGB['thistle'] = 'd8bfd8'
+let s:Name_2_RGB['snow1'] = 'fffafa'
+let s:Name_2_RGB['snow2'] = 'eee9e9'
+let s:Name_2_RGB['snow3'] = 'cdc9c9'
+let s:Name_2_RGB['snow4'] = '8b8989'
+let s:Name_2_RGB['seashell1'] = 'fff5ee'
+let s:Name_2_RGB['seashell2'] = 'eee5de'
+let s:Name_2_RGB['seashell3'] = 'cdc5bf'
+let s:Name_2_RGB['seashell4'] = '8b8682'
+let s:Name_2_RGB['AntiqueWhite1'] = 'ffefdb'
+let s:Name_2_RGB['antiquewhite1'] = 'ffefdb'
+let s:Name_2_RGB['AntiqueWhite2'] = 'eedfcc'
+let s:Name_2_RGB['antiquewhite2'] = 'eedfcc'
+let s:Name_2_RGB['AntiqueWhite3'] = 'cdc0b0'
+let s:Name_2_RGB['antiquewhite3'] = 'cdc0b0'
+let s:Name_2_RGB['AntiqueWhite4'] = '8b8378'
+let s:Name_2_RGB['antiquewhite4'] = '8b8378'
+let s:Name_2_RGB['bisque1'] = 'ffe4c4'
+let s:Name_2_RGB['bisque2'] = 'eed5b7'
+let s:Name_2_RGB['bisque3'] = 'cdb79e'
+let s:Name_2_RGB['bisque4'] = '8b7d6b'
+let s:Name_2_RGB['PeachPuff1'] = 'ffdab9'
+let s:Name_2_RGB['peachpuff1'] = 'ffdab9'
+let s:Name_2_RGB['PeachPuff2'] = 'eecbad'
+let s:Name_2_RGB['peachpuff2'] = 'eecbad'
+let s:Name_2_RGB['PeachPuff3'] = 'cdaf95'
+let s:Name_2_RGB['peachpuff3'] = 'cdaf95'
+let s:Name_2_RGB['PeachPuff4'] = '8b7765'
+let s:Name_2_RGB['peachpuff4'] = '8b7765'
+let s:Name_2_RGB['NavajoWhite1'] = 'ffdead'
+let s:Name_2_RGB['navajowhite1'] = 'ffdead'
+let s:Name_2_RGB['NavajoWhite2'] = 'eecfa1'
+let s:Name_2_RGB['navajowhite2'] = 'eecfa1'
+let s:Name_2_RGB['NavajoWhite3'] = 'cdb38b'
+let s:Name_2_RGB['navajowhite3'] = 'cdb38b'
+let s:Name_2_RGB['NavajoWhite4'] = '8b795e'
+let s:Name_2_RGB['navajowhite4'] = '8b795e'
+let s:Name_2_RGB['LemonChiffon1'] = 'fffacd'
+let s:Name_2_RGB['lemonchiffon1'] = 'fffacd'
+let s:Name_2_RGB['LemonChiffon2'] = 'eee9bf'
+let s:Name_2_RGB['lemonchiffon2'] = 'eee9bf'
+let s:Name_2_RGB['LemonChiffon3'] = 'cdc9a5'
+let s:Name_2_RGB['lemonchiffon3'] = 'cdc9a5'
+let s:Name_2_RGB['LemonChiffon4'] = '8b8970'
+let s:Name_2_RGB['lemonchiffon4'] = '8b8970'
+let s:Name_2_RGB['cornsilk1'] = 'fff8dc'
+let s:Name_2_RGB['cornsilk2'] = 'eee8cd'
+let s:Name_2_RGB['cornsilk3'] = 'cdc8b1'
+let s:Name_2_RGB['cornsilk4'] = '8b8878'
+let s:Name_2_RGB['ivory1'] = 'fffff0'
+let s:Name_2_RGB['ivory2'] = 'eeeee0'
+let s:Name_2_RGB['ivory3'] = 'cdcdc1'
+let s:Name_2_RGB['ivory4'] = '8b8b83'
+let s:Name_2_RGB['honeydew1'] = 'f0fff0'
+let s:Name_2_RGB['honeydew2'] = 'e0eee0'
+let s:Name_2_RGB['honeydew3'] = 'c1cdc1'
+let s:Name_2_RGB['honeydew4'] = '838b83'
+let s:Name_2_RGB['LavenderBlush1'] = 'fff0f5'
+let s:Name_2_RGB['lavenderblush1'] = 'fff0f5'
+let s:Name_2_RGB['LavenderBlush2'] = 'eee0e5'
+let s:Name_2_RGB['lavenderblush2'] = 'eee0e5'
+let s:Name_2_RGB['LavenderBlush3'] = 'cdc1c5'
+let s:Name_2_RGB['lavenderblush3'] = 'cdc1c5'
+let s:Name_2_RGB['LavenderBlush4'] = '8b8386'
+let s:Name_2_RGB['lavenderblush4'] = '8b8386'
+let s:Name_2_RGB['MistyRose1'] = 'ffe4e1'
+let s:Name_2_RGB['mistyrose1'] = 'ffe4e1'
+let s:Name_2_RGB['MistyRose2'] = 'eed5d2'
+let s:Name_2_RGB['mistyrose2'] = 'eed5d2'
+let s:Name_2_RGB['MistyRose3'] = 'cdb7b5'
+let s:Name_2_RGB['mistyrose3'] = 'cdb7b5'
+let s:Name_2_RGB['MistyRose4'] = '8b7d7b'
+let s:Name_2_RGB['mistyrose4'] = '8b7d7b'
+let s:Name_2_RGB['azure1'] = 'f0ffff'
+let s:Name_2_RGB['azure2'] = 'e0eeee'
+let s:Name_2_RGB['azure3'] = 'c1cdcd'
+let s:Name_2_RGB['azure4'] = '838b8b'
+let s:Name_2_RGB['SlateBlue1'] = '836fff'
+let s:Name_2_RGB['slateblue1'] = '836fff'
+let s:Name_2_RGB['SlateBlue2'] = '7a67ee'
+let s:Name_2_RGB['slateblue2'] = '7a67ee'
+let s:Name_2_RGB['SlateBlue3'] = '6959cd'
+let s:Name_2_RGB['slateblue3'] = '6959cd'
+let s:Name_2_RGB['SlateBlue4'] = '473c8b'
+let s:Name_2_RGB['slateblue4'] = '473c8b'
+let s:Name_2_RGB['RoyalBlue1'] = '4876ff'
+let s:Name_2_RGB['royalblue1'] = '4876ff'
+let s:Name_2_RGB['RoyalBlue2'] = '436eee'
+let s:Name_2_RGB['royalblue2'] = '436eee'
+let s:Name_2_RGB['RoyalBlue3'] = '3a5fcd'
+let s:Name_2_RGB['royalblue3'] = '3a5fcd'
+let s:Name_2_RGB['RoyalBlue4'] = '27408b'
+let s:Name_2_RGB['royalblue4'] = '27408b'
+let s:Name_2_RGB['blue1'] = '0000ff'
+let s:Name_2_RGB['blue2'] = '0000ee'
+let s:Name_2_RGB['blue3'] = '0000cd'
+let s:Name_2_RGB['blue4'] = '00008b'
+let s:Name_2_RGB['DodgerBlue1'] = '1e90ff'
+let s:Name_2_RGB['dodgerblue1'] = '1e90ff'
+let s:Name_2_RGB['DodgerBlue2'] = '1c86ee'
+let s:Name_2_RGB['dodgerblue2'] = '1c86ee'
+let s:Name_2_RGB['DodgerBlue3'] = '1874cd'
+let s:Name_2_RGB['dodgerblue3'] = '1874cd'
+let s:Name_2_RGB['DodgerBlue4'] = '104e8b'
+let s:Name_2_RGB['dodgerblue4'] = '104e8b'
+let s:Name_2_RGB['SteelBlue1'] = '63b8ff'
+let s:Name_2_RGB['steelblue1'] = '63b8ff'
+let s:Name_2_RGB['SteelBlue2'] = '5cacee'
+let s:Name_2_RGB['steelblue2'] = '5cacee'
+let s:Name_2_RGB['SteelBlue3'] = '4f94cd'
+let s:Name_2_RGB['steelblue3'] = '4f94cd'
+let s:Name_2_RGB['SteelBlue4'] = '36648b'
+let s:Name_2_RGB['steelblue4'] = '36648b'
+let s:Name_2_RGB['DeepSkyBlue1'] = '00bfff'
+let s:Name_2_RGB['deepskyblue1'] = '00bfff'
+let s:Name_2_RGB['DeepSkyBlue2'] = '00b2ee'
+let s:Name_2_RGB['deepskyblue2'] = '00b2ee'
+let s:Name_2_RGB['DeepSkyBlue3'] = '009acd'
+let s:Name_2_RGB['deepskyblue3'] = '009acd'
+let s:Name_2_RGB['DeepSkyBlue4'] = '00688b'
+let s:Name_2_RGB['deepskyblue4'] = '00688b'
+let s:Name_2_RGB['SkyBlue1'] = '87ceff'
+let s:Name_2_RGB['skyblue1'] = '87ceff'
+let s:Name_2_RGB['SkyBlue2'] = '7ec0ee'
+let s:Name_2_RGB['skyblue2'] = '7ec0ee'
+let s:Name_2_RGB['SkyBlue3'] = '6ca6cd'
+let s:Name_2_RGB['skyblue3'] = '6ca6cd'
+let s:Name_2_RGB['SkyBlue4'] = '4a708b'
+let s:Name_2_RGB['skyblue4'] = '4a708b'
+let s:Name_2_RGB['LightSkyBlue1'] = 'b0e2ff'
+let s:Name_2_RGB['lightskyblue1'] = 'b0e2ff'
+let s:Name_2_RGB['LightSkyBlue2'] = 'a4d3ee'
+let s:Name_2_RGB['lightskyblue2'] = 'a4d3ee'
+let s:Name_2_RGB['LightSkyBlue3'] = '8db6cd'
+let s:Name_2_RGB['lightskyblue3'] = '8db6cd'
+let s:Name_2_RGB['LightSkyBlue4'] = '607b8b'
+let s:Name_2_RGB['lightskyblue4'] = '607b8b'
+let s:Name_2_RGB['SlateGray1'] = 'c6e2ff'
+let s:Name_2_RGB['slategray1'] = 'c6e2ff'
+let s:Name_2_RGB['SlateGray2'] = 'b9d3ee'
+let s:Name_2_RGB['slategray2'] = 'b9d3ee'
+let s:Name_2_RGB['SlateGray3'] = '9fb6cd'
+let s:Name_2_RGB['slategray3'] = '9fb6cd'
+let s:Name_2_RGB['SlateGray4'] = '6c7b8b'
+let s:Name_2_RGB['slategray4'] = '6c7b8b'
+let s:Name_2_RGB['LightSteelBlue1'] = 'cae1ff'
+let s:Name_2_RGB['lightsteelblue1'] = 'cae1ff'
+let s:Name_2_RGB['LightSteelBlue2'] = 'bcd2ee'
+let s:Name_2_RGB['lightsteelblue2'] = 'bcd2ee'
+let s:Name_2_RGB['LightSteelBlue3'] = 'a2b5cd'
+let s:Name_2_RGB['lightsteelblue3'] = 'a2b5cd'
+let s:Name_2_RGB['LightSteelBlue4'] = '6e7b8b'
+let s:Name_2_RGB['lightsteelblue4'] = '6e7b8b'
+let s:Name_2_RGB['LightBlue1'] = 'bfefff'
+let s:Name_2_RGB['lightblue1'] = 'bfefff'
+let s:Name_2_RGB['LightBlue2'] = 'b2dfee'
+let s:Name_2_RGB['lightblue2'] = 'b2dfee'
+let s:Name_2_RGB['LightBlue3'] = '9ac0cd'
+let s:Name_2_RGB['lightblue3'] = '9ac0cd'
+let s:Name_2_RGB['LightBlue4'] = '68838b'
+let s:Name_2_RGB['lightblue4'] = '68838b'
+let s:Name_2_RGB['LightCyan1'] = 'e0ffff'
+let s:Name_2_RGB['lightcyan1'] = 'e0ffff'
+let s:Name_2_RGB['LightCyan2'] = 'd1eeee'
+let s:Name_2_RGB['lightcyan2'] = 'd1eeee'
+let s:Name_2_RGB['LightCyan3'] = 'b4cdcd'
+let s:Name_2_RGB['lightcyan3'] = 'b4cdcd'
+let s:Name_2_RGB['LightCyan4'] = '7a8b8b'
+let s:Name_2_RGB['lightcyan4'] = '7a8b8b'
+let s:Name_2_RGB['PaleTurquoise1'] = 'bbffff'
+let s:Name_2_RGB['paleturquoise1'] = 'bbffff'
+let s:Name_2_RGB['PaleTurquoise2'] = 'aeeeee'
+let s:Name_2_RGB['paleturquoise2'] = 'aeeeee'
+let s:Name_2_RGB['PaleTurquoise3'] = '96cdcd'
+let s:Name_2_RGB['paleturquoise3'] = '96cdcd'
+let s:Name_2_RGB['PaleTurquoise4'] = '668b8b'
+let s:Name_2_RGB['paleturquoise4'] = '668b8b'
+let s:Name_2_RGB['CadetBlue1'] = '98f5ff'
+let s:Name_2_RGB['cadetblue1'] = '98f5ff'
+let s:Name_2_RGB['CadetBlue2'] = '8ee5ee'
+let s:Name_2_RGB['cadetblue2'] = '8ee5ee'
+let s:Name_2_RGB['CadetBlue3'] = '7ac5cd'
+let s:Name_2_RGB['cadetblue3'] = '7ac5cd'
+let s:Name_2_RGB['CadetBlue4'] = '53868b'
+let s:Name_2_RGB['cadetblue4'] = '53868b'
+let s:Name_2_RGB['turquoise1'] = '00f5ff'
+let s:Name_2_RGB['turquoise2'] = '00e5ee'
+let s:Name_2_RGB['turquoise3'] = '00c5cd'
+let s:Name_2_RGB['turquoise4'] = '00868b'
+let s:Name_2_RGB['cyan1'] = '00ffff'
+let s:Name_2_RGB['cyan2'] = '00eeee'
+let s:Name_2_RGB['cyan3'] = '00cdcd'
+let s:Name_2_RGB['cyan4'] = '008b8b'
+let s:Name_2_RGB['DarkSlateGray1'] = '97ffff'
+let s:Name_2_RGB['darkslategray1'] = '97ffff'
+let s:Name_2_RGB['DarkSlateGray2'] = '8deeee'
+let s:Name_2_RGB['darkslategray2'] = '8deeee'
+let s:Name_2_RGB['DarkSlateGray3'] = '79cdcd'
+let s:Name_2_RGB['darkslategray3'] = '79cdcd'
+let s:Name_2_RGB['DarkSlateGray4'] = '528b8b'
+let s:Name_2_RGB['darkslategray4'] = '528b8b'
+let s:Name_2_RGB['aquamarine1'] = '7fffd4'
+let s:Name_2_RGB['aquamarine2'] = '76eec6'
+let s:Name_2_RGB['aquamarine3'] = '66cdaa'
+let s:Name_2_RGB['aquamarine4'] = '458b74'
+let s:Name_2_RGB['DarkSeaGreen1'] = 'c1ffc1'
+let s:Name_2_RGB['darkseagreen1'] = 'c1ffc1'
+let s:Name_2_RGB['DarkSeaGreen2'] = 'b4eeb4'
+let s:Name_2_RGB['darkseagreen2'] = 'b4eeb4'
+let s:Name_2_RGB['DarkSeaGreen3'] = '9bcd9b'
+let s:Name_2_RGB['darkseagreen3'] = '9bcd9b'
+let s:Name_2_RGB['DarkSeaGreen4'] = '698b69'
+let s:Name_2_RGB['darkseagreen4'] = '698b69'
+let s:Name_2_RGB['SeaGreen1'] = '54ff9f'
+let s:Name_2_RGB['seagreen1'] = '54ff9f'
+let s:Name_2_RGB['SeaGreen2'] = '4eee94'
+let s:Name_2_RGB['seagreen2'] = '4eee94'
+let s:Name_2_RGB['SeaGreen3'] = '43cd80'
+let s:Name_2_RGB['seagreen3'] = '43cd80'
+let s:Name_2_RGB['SeaGreen4'] = '2e8b57'
+let s:Name_2_RGB['seagreen4'] = '2e8b57'
+let s:Name_2_RGB['PaleGreen1'] = '9aff9a'
+let s:Name_2_RGB['palegreen1'] = '9aff9a'
+let s:Name_2_RGB['PaleGreen2'] = '90ee90'
+let s:Name_2_RGB['palegreen2'] = '90ee90'
+let s:Name_2_RGB['PaleGreen3'] = '7ccd7c'
+let s:Name_2_RGB['palegreen3'] = '7ccd7c'
+let s:Name_2_RGB['PaleGreen4'] = '548b54'
+let s:Name_2_RGB['palegreen4'] = '548b54'
+let s:Name_2_RGB['SpringGreen1'] = '00ff7f'
+let s:Name_2_RGB['springgreen1'] = '00ff7f'
+let s:Name_2_RGB['SpringGreen2'] = '00ee76'
+let s:Name_2_RGB['springgreen2'] = '00ee76'
+let s:Name_2_RGB['SpringGreen3'] = '00cd66'
+let s:Name_2_RGB['springgreen3'] = '00cd66'
+let s:Name_2_RGB['SpringGreen4'] = '008b45'
+let s:Name_2_RGB['springgreen4'] = '008b45'
+let s:Name_2_RGB['green1'] = '00ff00'
+let s:Name_2_RGB['green2'] = '00ee00'
+let s:Name_2_RGB['green3'] = '00cd00'
+let s:Name_2_RGB['green4'] = '008b00'
+let s:Name_2_RGB['chartreuse1'] = '7fff00'
+let s:Name_2_RGB['chartreuse2'] = '76ee00'
+let s:Name_2_RGB['chartreuse3'] = '66cd00'
+let s:Name_2_RGB['chartreuse4'] = '458b00'
+let s:Name_2_RGB['OliveDrab1'] = 'c0ff3e'
+let s:Name_2_RGB['olivedrab1'] = 'c0ff3e'
+let s:Name_2_RGB['OliveDrab2'] = 'b3ee3a'
+let s:Name_2_RGB['olivedrab2'] = 'b3ee3a'
+let s:Name_2_RGB['OliveDrab3'] = '9acd32'
+let s:Name_2_RGB['olivedrab3'] = '9acd32'
+let s:Name_2_RGB['OliveDrab4'] = '698b22'
+let s:Name_2_RGB['olivedrab4'] = '698b22'
+let s:Name_2_RGB['DarkOliveGreen1'] = 'caff70'
+let s:Name_2_RGB['darkolivegreen1'] = 'caff70'
+let s:Name_2_RGB['DarkOliveGreen2'] = 'bcee68'
+let s:Name_2_RGB['darkolivegreen2'] = 'bcee68'
+let s:Name_2_RGB['DarkOliveGreen3'] = 'a2cd5a'
+let s:Name_2_RGB['darkolivegreen3'] = 'a2cd5a'
+let s:Name_2_RGB['DarkOliveGreen4'] = '6e8b3d'
+let s:Name_2_RGB['darkolivegreen4'] = '6e8b3d'
+let s:Name_2_RGB['khaki1'] = 'fff68f'
+let s:Name_2_RGB['khaki2'] = 'eee685'
+let s:Name_2_RGB['khaki3'] = 'cdc673'
+let s:Name_2_RGB['khaki4'] = '8b864e'
+let s:Name_2_RGB['LightGoldenrod1'] = 'ffec8b'
+let s:Name_2_RGB['lightgoldenrod1'] = 'ffec8b'
+let s:Name_2_RGB['LightGoldenrod2'] = 'eedc82'
+let s:Name_2_RGB['lightgoldenrod2'] = 'eedc82'
+let s:Name_2_RGB['LightGoldenrod3'] = 'cdbe70'
+let s:Name_2_RGB['lightgoldenrod3'] = 'cdbe70'
+let s:Name_2_RGB['LightGoldenrod4'] = '8b814c'
+let s:Name_2_RGB['lightgoldenrod4'] = '8b814c'
+let s:Name_2_RGB['LightYellow1'] = 'ffffe0'
+let s:Name_2_RGB['lightyellow1'] = 'ffffe0'
+let s:Name_2_RGB['LightYellow2'] = 'eeeed1'
+let s:Name_2_RGB['lightyellow2'] = 'eeeed1'
+let s:Name_2_RGB['LightYellow3'] = 'cdcdb4'
+let s:Name_2_RGB['lightyellow3'] = 'cdcdb4'
+let s:Name_2_RGB['LightYellow4'] = '8b8b7a'
+let s:Name_2_RGB['lightyellow4'] = '8b8b7a'
+let s:Name_2_RGB['yellow1'] = 'ffff00'
+let s:Name_2_RGB['yellow2'] = 'eeee00'
+let s:Name_2_RGB['yellow3'] = 'cdcd00'
+let s:Name_2_RGB['yellow4'] = '8b8b00'
+let s:Name_2_RGB['darkyellow'] = '8b8b00'
+let s:Name_2_RGB['gold1'] = 'ffd700'
+let s:Name_2_RGB['gold2'] = 'eec900'
+let s:Name_2_RGB['gold3'] = 'cdad00'
+let s:Name_2_RGB['gold4'] = '8b7500'
+let s:Name_2_RGB['goldenrod1'] = 'ffc125'
+let s:Name_2_RGB['goldenrod2'] = 'eeb422'
+let s:Name_2_RGB['goldenrod3'] = 'cd9b1d'
+let s:Name_2_RGB['goldenrod4'] = '8b6914'
+let s:Name_2_RGB['DarkGoldenrod1'] = 'ffb90f'
+let s:Name_2_RGB['darkgoldenrod1'] = 'ffb90f'
+let s:Name_2_RGB['DarkGoldenrod2'] = 'eead0e'
+let s:Name_2_RGB['darkgoldenrod2'] = 'eead0e'
+let s:Name_2_RGB['DarkGoldenrod3'] = 'cd950c'
+let s:Name_2_RGB['darkgoldenrod3'] = 'cd950c'
+let s:Name_2_RGB['DarkGoldenrod4'] = '8b6508'
+let s:Name_2_RGB['darkgoldenrod4'] = '8b6508'
+let s:Name_2_RGB['RosyBrown1'] = 'ffc1c1'
+let s:Name_2_RGB['rosybrown1'] = 'ffc1c1'
+let s:Name_2_RGB['RosyBrown2'] = 'eeb4b4'
+let s:Name_2_RGB['rosybrown2'] = 'eeb4b4'
+let s:Name_2_RGB['RosyBrown3'] = 'cd9b9b'
+let s:Name_2_RGB['rosybrown3'] = 'cd9b9b'
+let s:Name_2_RGB['RosyBrown4'] = '8b6969'
+let s:Name_2_RGB['rosybrown4'] = '8b6969'
+let s:Name_2_RGB['IndianRed1'] = 'ff6a6a'
+let s:Name_2_RGB['indianred1'] = 'ff6a6a'
+let s:Name_2_RGB['IndianRed2'] = 'ee6363'
+let s:Name_2_RGB['indianred2'] = 'ee6363'
+let s:Name_2_RGB['IndianRed3'] = 'cd5555'
+let s:Name_2_RGB['indianred3'] = 'cd5555'
+let s:Name_2_RGB['IndianRed4'] = '8b3a3a'
+let s:Name_2_RGB['indianred4'] = '8b3a3a'
+let s:Name_2_RGB['sienna1'] = 'ff8247'
+let s:Name_2_RGB['sienna2'] = 'ee7942'
+let s:Name_2_RGB['sienna3'] = 'cd6839'
+let s:Name_2_RGB['sienna4'] = '8b4726'
+let s:Name_2_RGB['burlywood1'] = 'ffd39b'
+let s:Name_2_RGB['burlywood2'] = 'eec591'
+let s:Name_2_RGB['burlywood3'] = 'cdaa7d'
+let s:Name_2_RGB['burlywood4'] = '8b7355'
+let s:Name_2_RGB['wheat1'] = 'ffe7ba'
+let s:Name_2_RGB['wheat2'] = 'eed8ae'
+let s:Name_2_RGB['wheat3'] = 'cdba96'
+let s:Name_2_RGB['wheat4'] = '8b7e66'
+let s:Name_2_RGB['tan1'] = 'ffa54f'
+let s:Name_2_RGB['tan2'] = 'ee9a49'
+let s:Name_2_RGB['tan3'] = 'cd853f'
+let s:Name_2_RGB['tan4'] = '8b5a2b'
+let s:Name_2_RGB['chocolate1'] = 'ff7f24'
+let s:Name_2_RGB['chocolate2'] = 'ee7621'
+let s:Name_2_RGB['chocolate3'] = 'cd661d'
+let s:Name_2_RGB['chocolate4'] = '8b4513'
+let s:Name_2_RGB['firebrick1'] = 'ff3030'
+let s:Name_2_RGB['firebrick2'] = 'ee2c2c'
+let s:Name_2_RGB['firebrick3'] = 'cd2626'
+let s:Name_2_RGB['firebrick4'] = '8b1a1a'
+let s:Name_2_RGB['brown1'] = 'ff4040'
+let s:Name_2_RGB['brown2'] = 'ee3b3b'
+let s:Name_2_RGB['brown3'] = 'cd3333'
+let s:Name_2_RGB['brown4'] = '8b2323'
+let s:Name_2_RGB['salmon1'] = 'ff8c69'
+let s:Name_2_RGB['salmon2'] = 'ee8262'
+let s:Name_2_RGB['salmon3'] = 'cd7054'
+let s:Name_2_RGB['salmon4'] = '8b4c39'
+let s:Name_2_RGB['LightSalmon1'] = 'ffa07a'
+let s:Name_2_RGB['lightsalmon1'] = 'ffa07a'
+let s:Name_2_RGB['LightSalmon2'] = 'ee9572'
+let s:Name_2_RGB['lightsalmon2'] = 'ee9572'
+let s:Name_2_RGB['LightSalmon3'] = 'cd8162'
+let s:Name_2_RGB['lightsalmon3'] = 'cd8162'
+let s:Name_2_RGB['LightSalmon4'] = '8b5742'
+let s:Name_2_RGB['lightsalmon4'] = '8b5742'
+let s:Name_2_RGB['orange1'] = 'ffa500'
+let s:Name_2_RGB['lightorange'] = 'ffa500'
+let s:Name_2_RGB['orange2'] = 'ee9a00'
+let s:Name_2_RGB['orange3'] = 'cd8500'
+let s:Name_2_RGB['orange4'] = '8b5a00'
+let s:Name_2_RGB['DarkOrange1'] = 'ff7f00'
+let s:Name_2_RGB['darkorange1'] = 'ff7f00'
+let s:Name_2_RGB['DarkOrange2'] = 'ee7600'
+let s:Name_2_RGB['darkorange2'] = 'ee7600'
+let s:Name_2_RGB['DarkOrange3'] = 'cd6600'
+let s:Name_2_RGB['darkorange3'] = 'cd6600'
+let s:Name_2_RGB['DarkOrange4'] = '8b4500'
+let s:Name_2_RGB['darkorange4'] = '8b4500'
+let s:Name_2_RGB['coral1'] = 'ff7256'
+let s:Name_2_RGB['coral2'] = 'ee6a50'
+let s:Name_2_RGB['coral3'] = 'cd5b45'
+let s:Name_2_RGB['coral4'] = '8b3e2f'
+let s:Name_2_RGB['tomato1'] = 'ff6347'
+let s:Name_2_RGB['tomato2'] = 'ee5c42'
+let s:Name_2_RGB['tomato3'] = 'cd4f39'
+let s:Name_2_RGB['tomato4'] = '8b3626'
+let s:Name_2_RGB['OrangeRed1'] = 'ff4500'
+let s:Name_2_RGB['orangered1'] = 'ff4500'
+let s:Name_2_RGB['OrangeRed2'] = 'ee4000'
+let s:Name_2_RGB['orangered2'] = 'ee4000'
+let s:Name_2_RGB['OrangeRed3'] = 'cd3700'
+let s:Name_2_RGB['orangered3'] = 'cd3700'
+let s:Name_2_RGB['OrangeRed4'] = '8b2500'
+let s:Name_2_RGB['orangered4'] = '8b2500'
+let s:Name_2_RGB['red1'] = 'ff0000'
+let s:Name_2_RGB['lightred'] = 'ff0000'
+let s:Name_2_RGB['red2'] = 'ee0000'
+let s:Name_2_RGB['red3'] = 'cd0000'
+let s:Name_2_RGB['red4'] = '8b0000'
+let s:Name_2_RGB['DeepPink1'] = 'ff1493'
+let s:Name_2_RGB['deeppink1'] = 'ff1493'
+let s:Name_2_RGB['DeepPink2'] = 'ee1289'
+let s:Name_2_RGB['deeppink2'] = 'ee1289'
+let s:Name_2_RGB['DeepPink3'] = 'cd1076'
+let s:Name_2_RGB['deeppink3'] = 'cd1076'
+let s:Name_2_RGB['DeepPink4'] = '8b0a50'
+let s:Name_2_RGB['deeppink4'] = '8b0a50'
+let s:Name_2_RGB['HotPink1'] = 'ff6eb4'
+let s:Name_2_RGB['hotpink1'] = 'ff6eb4'
+let s:Name_2_RGB['HotPink2'] = 'ee6aa7'
+let s:Name_2_RGB['hotpink2'] = 'ee6aa7'
+let s:Name_2_RGB['HotPink3'] = 'cd6090'
+let s:Name_2_RGB['hotpink3'] = 'cd6090'
+let s:Name_2_RGB['HotPink4'] = '8b3a62'
+let s:Name_2_RGB['hotpink4'] = '8b3a62'
+let s:Name_2_RGB['pink1'] = 'ffb5c5'
+let s:Name_2_RGB['pink2'] = 'eea9b8'
+let s:Name_2_RGB['pink3'] = 'cd919e'
+let s:Name_2_RGB['pink4'] = '8b636c'
+let s:Name_2_RGB['LightPink1'] = 'ffaeb9'
+let s:Name_2_RGB['lightpink1'] = 'ffaeb9'
+let s:Name_2_RGB['LightPink2'] = 'eea2ad'
+let s:Name_2_RGB['lightpink2'] = 'eea2ad'
+let s:Name_2_RGB['LightPink3'] = 'cd8c95'
+let s:Name_2_RGB['lightpink3'] = 'cd8c95'
+let s:Name_2_RGB['LightPink4'] = '8b5f65'
+let s:Name_2_RGB['lightpink4'] = '8b5f65'
+let s:Name_2_RGB['PaleVioletRed1'] = 'ff82ab'
+let s:Name_2_RGB['palevioletred1'] = 'ff82ab'
+let s:Name_2_RGB['PaleVioletRed2'] = 'ee799f'
+let s:Name_2_RGB['palevioletred2'] = 'ee799f'
+let s:Name_2_RGB['PaleVioletRed3'] = 'cd6889'
+let s:Name_2_RGB['palevioletred3'] = 'cd6889'
+let s:Name_2_RGB['PaleVioletRed4'] = '8b475d'
+let s:Name_2_RGB['palevioletred4'] = '8b475d'
+let s:Name_2_RGB['maroon1'] = 'ff34b3'
+let s:Name_2_RGB['maroon2'] = 'ee30a7'
+let s:Name_2_RGB['maroon3'] = 'cd2990'
+let s:Name_2_RGB['maroon4'] = '8b1c62'
+let s:Name_2_RGB['VioletRed1'] = 'ff3e96'
+let s:Name_2_RGB['violetred1'] = 'ff3e96'
+let s:Name_2_RGB['VioletRed2'] = 'ee3a8c'
+let s:Name_2_RGB['violetred2'] = 'ee3a8c'
+let s:Name_2_RGB['VioletRed3'] = 'cd3278'
+let s:Name_2_RGB['violetred3'] = 'cd3278'
+let s:Name_2_RGB['VioletRed4'] = '8b2252'
+let s:Name_2_RGB['violetred4'] = '8b2252'
+let s:Name_2_RGB['magenta1'] = 'ff00ff'
+let s:Name_2_RGB['lightmagenta'] = 'ff00ff'
+let s:Name_2_RGB['magenta2'] = 'ee00ee'
+let s:Name_2_RGB['magenta3'] = 'cd00cd'
+let s:Name_2_RGB['magenta4'] = '8b008b'
+let s:Name_2_RGB['orchid1'] = 'ff83fa'
+let s:Name_2_RGB['orchid2'] = 'ee7ae9'
+let s:Name_2_RGB['orchid3'] = 'cd69c9'
+let s:Name_2_RGB['orchid4'] = '8b4789'
+let s:Name_2_RGB['plum1'] = 'ffbbff'
+let s:Name_2_RGB['plum2'] = 'eeaeee'
+let s:Name_2_RGB['plum3'] = 'cd96cd'
+let s:Name_2_RGB['plum4'] = '8b668b'
+let s:Name_2_RGB['MediumOrchid1'] = 'e066ff'
+let s:Name_2_RGB['mediumorchid1'] = 'e066ff'
+let s:Name_2_RGB['MediumOrchid2'] = 'd15fee'
+let s:Name_2_RGB['mediumorchid2'] = 'd15fee'
+let s:Name_2_RGB['MediumOrchid3'] = 'b452cd'
+let s:Name_2_RGB['mediumorchid3'] = 'b452cd'
+let s:Name_2_RGB['MediumOrchid4'] = '7a378b'
+let s:Name_2_RGB['mediumorchid4'] = '7a378b'
+let s:Name_2_RGB['DarkOrchid1'] = 'bf3eff'
+let s:Name_2_RGB['darkorchid1'] = 'bf3eff'
+let s:Name_2_RGB['DarkOrchid2'] = 'b23aee'
+let s:Name_2_RGB['darkorchid2'] = 'b23aee'
+let s:Name_2_RGB['DarkOrchid3'] = '9a32cd'
+let s:Name_2_RGB['darkorchid3'] = '9a32cd'
+let s:Name_2_RGB['DarkOrchid4'] = '68228b'
+let s:Name_2_RGB['darkorchid4'] = '68228b'
+let s:Name_2_RGB['purple1'] = '9b30ff'
+let s:Name_2_RGB['purple2'] = '912cee'
+let s:Name_2_RGB['purple3'] = '7d26cd'
+let s:Name_2_RGB['purple4'] = '551a8b'
+let s:Name_2_RGB['MediumPurple1'] = 'ab82ff'
+let s:Name_2_RGB['mediumpurple1'] = 'ab82ff'
+let s:Name_2_RGB['MediumPurple2'] = '9f79ee'
+let s:Name_2_RGB['mediumpurple2'] = '9f79ee'
+let s:Name_2_RGB['MediumPurple3'] = '8968cd'
+let s:Name_2_RGB['mediumpurple3'] = '8968cd'
+let s:Name_2_RGB['MediumPurple4'] = '5d478b'
+let s:Name_2_RGB['mediumpurple4'] = '5d478b'
+let s:Name_2_RGB['thistle1'] = 'ffe1ff'
+let s:Name_2_RGB['thistle2'] = 'eed2ee'
+let s:Name_2_RGB['thistle3'] = 'cdb5cd'
+let s:Name_2_RGB['thistle4'] = '8b7b8b'
+let s:Name_2_RGB['gray0'] = '000000'
+let s:Name_2_RGB['grey0'] = '000000'
+let s:Name_2_RGB['gray1'] = '030303'
+let s:Name_2_RGB['grey1'] = '030303'
+let s:Name_2_RGB['gray2'] = '050505'
+let s:Name_2_RGB['grey2'] = '050505'
+let s:Name_2_RGB['gray3'] = '080808'
+let s:Name_2_RGB['grey3'] = '080808'
+let s:Name_2_RGB['gray4'] = '0a0a0a'
+let s:Name_2_RGB['grey4'] = '0a0a0a'
+let s:Name_2_RGB['gray5'] = '0d0d0d'
+let s:Name_2_RGB['grey5'] = '0d0d0d'
+let s:Name_2_RGB['gray6'] = '0f0f0f'
+let s:Name_2_RGB['grey6'] = '0f0f0f'
+let s:Name_2_RGB['gray7'] = '121212'
+let s:Name_2_RGB['grey7'] = '121212'
+let s:Name_2_RGB['gray8'] = '141414'
+let s:Name_2_RGB['grey8'] = '141414'
+let s:Name_2_RGB['gray9'] = '171717'
+let s:Name_2_RGB['grey9'] = '171717'
+let s:Name_2_RGB['gray10'] = '1a1a1a'
+let s:Name_2_RGB['grey10'] = '1a1a1a'
+let s:Name_2_RGB['gray11'] = '1c1c1c'
+let s:Name_2_RGB['grey11'] = '1c1c1c'
+let s:Name_2_RGB['gray12'] = '1f1f1f'
+let s:Name_2_RGB['grey12'] = '1f1f1f'
+let s:Name_2_RGB['gray13'] = '212121'
+let s:Name_2_RGB['grey13'] = '212121'
+let s:Name_2_RGB['gray14'] = '242424'
+let s:Name_2_RGB['grey14'] = '242424'
+let s:Name_2_RGB['gray15'] = '262626'
+let s:Name_2_RGB['grey15'] = '262626'
+let s:Name_2_RGB['gray16'] = '292929'
+let s:Name_2_RGB['grey16'] = '292929'
+let s:Name_2_RGB['gray17'] = '2b2b2b'
+let s:Name_2_RGB['grey17'] = '2b2b2b'
+let s:Name_2_RGB['gray18'] = '2e2e2e'
+let s:Name_2_RGB['grey18'] = '2e2e2e'
+let s:Name_2_RGB['gray19'] = '303030'
+let s:Name_2_RGB['grey19'] = '303030'
+let s:Name_2_RGB['gray20'] = '333333'
+let s:Name_2_RGB['grey20'] = '333333'
+let s:Name_2_RGB['gray21'] = '363636'
+let s:Name_2_RGB['grey21'] = '363636'
+let s:Name_2_RGB['gray22'] = '383838'
+let s:Name_2_RGB['grey22'] = '383838'
+let s:Name_2_RGB['gray23'] = '3b3b3b'
+let s:Name_2_RGB['grey23'] = '3b3b3b'
+let s:Name_2_RGB['gray24'] = '3d3d3d'
+let s:Name_2_RGB['grey24'] = '3d3d3d'
+let s:Name_2_RGB['gray25'] = '404040'
+let s:Name_2_RGB['grey25'] = '404040'
+let s:Name_2_RGB['gray26'] = '424242'
+let s:Name_2_RGB['grey26'] = '424242'
+let s:Name_2_RGB['gray27'] = '454545'
+let s:Name_2_RGB['grey27'] = '454545'
+let s:Name_2_RGB['gray28'] = '474747'
+let s:Name_2_RGB['grey28'] = '474747'
+let s:Name_2_RGB['gray29'] = '4a4a4a'
+let s:Name_2_RGB['grey29'] = '4a4a4a'
+let s:Name_2_RGB['gray30'] = '4d4d4d'
+let s:Name_2_RGB['grey30'] = '4d4d4d'
+let s:Name_2_RGB['gray31'] = '4f4f4f'
+let s:Name_2_RGB['grey31'] = '4f4f4f'
+let s:Name_2_RGB['gray32'] = '525252'
+let s:Name_2_RGB['grey32'] = '525252'
+let s:Name_2_RGB['gray33'] = '545454'
+let s:Name_2_RGB['grey33'] = '545454'
+let s:Name_2_RGB['gray34'] = '575757'
+let s:Name_2_RGB['grey34'] = '575757'
+let s:Name_2_RGB['gray35'] = '595959'
+let s:Name_2_RGB['grey35'] = '595959'
+let s:Name_2_RGB['gray36'] = '5c5c5c'
+let s:Name_2_RGB['grey36'] = '5c5c5c'
+let s:Name_2_RGB['gray37'] = '5e5e5e'
+let s:Name_2_RGB['grey37'] = '5e5e5e'
+let s:Name_2_RGB['gray38'] = '616161'
+let s:Name_2_RGB['grey38'] = '616161'
+let s:Name_2_RGB['gray39'] = '636363'
+let s:Name_2_RGB['grey39'] = '636363'
+let s:Name_2_RGB['gray40'] = '666666'
+let s:Name_2_RGB['grey40'] = '666666'
+let s:Name_2_RGB['gray41'] = '696969'
+let s:Name_2_RGB['grey41'] = '696969'
+let s:Name_2_RGB['gray42'] = '6b6b6b'
+let s:Name_2_RGB['grey42'] = '6b6b6b'
+let s:Name_2_RGB['gray43'] = '6e6e6e'
+let s:Name_2_RGB['grey43'] = '6e6e6e'
+let s:Name_2_RGB['gray44'] = '707070'
+let s:Name_2_RGB['grey44'] = '707070'
+let s:Name_2_RGB['gray45'] = '737373'
+let s:Name_2_RGB['grey45'] = '737373'
+let s:Name_2_RGB['gray46'] = '757575'
+let s:Name_2_RGB['grey46'] = '757575'
+let s:Name_2_RGB['gray47'] = '787878'
+let s:Name_2_RGB['grey47'] = '787878'
+let s:Name_2_RGB['gray48'] = '7a7a7a'
+let s:Name_2_RGB['grey48'] = '7a7a7a'
+let s:Name_2_RGB['gray49'] = '7d7d7d'
+let s:Name_2_RGB['grey49'] = '7d7d7d'
+let s:Name_2_RGB['gray50'] = '7f7f7f'
+let s:Name_2_RGB['grey50'] = '7f7f7f'
+let s:Name_2_RGB['gray51'] = '828282'
+let s:Name_2_RGB['grey51'] = '828282'
+let s:Name_2_RGB['gray52'] = '858585'
+let s:Name_2_RGB['grey52'] = '858585'
+let s:Name_2_RGB['gray53'] = '878787'
+let s:Name_2_RGB['grey53'] = '878787'
+let s:Name_2_RGB['gray54'] = '8a8a8a'
+let s:Name_2_RGB['grey54'] = '8a8a8a'
+let s:Name_2_RGB['gray55'] = '8c8c8c'
+let s:Name_2_RGB['grey55'] = '8c8c8c'
+let s:Name_2_RGB['gray56'] = '8f8f8f'
+let s:Name_2_RGB['grey56'] = '8f8f8f'
+let s:Name_2_RGB['gray57'] = '919191'
+let s:Name_2_RGB['grey57'] = '919191'
+let s:Name_2_RGB['gray58'] = '949494'
+let s:Name_2_RGB['grey58'] = '949494'
+let s:Name_2_RGB['gray59'] = '969696'
+let s:Name_2_RGB['grey59'] = '969696'
+let s:Name_2_RGB['gray60'] = '999999'
+let s:Name_2_RGB['grey60'] = '999999'
+let s:Name_2_RGB['gray61'] = '9c9c9c'
+let s:Name_2_RGB['grey61'] = '9c9c9c'
+let s:Name_2_RGB['gray62'] = '9e9e9e'
+let s:Name_2_RGB['grey62'] = '9e9e9e'
+let s:Name_2_RGB['gray63'] = 'a1a1a1'
+let s:Name_2_RGB['grey63'] = 'a1a1a1'
+let s:Name_2_RGB['gray64'] = 'a3a3a3'
+let s:Name_2_RGB['grey64'] = 'a3a3a3'
+let s:Name_2_RGB['gray65'] = 'a6a6a6'
+let s:Name_2_RGB['grey65'] = 'a6a6a6'
+let s:Name_2_RGB['gray66'] = 'a8a8a8'
+let s:Name_2_RGB['grey66'] = 'a8a8a8'
+let s:Name_2_RGB['gray67'] = 'ababab'
+let s:Name_2_RGB['grey67'] = 'ababab'
+let s:Name_2_RGB['gray68'] = 'adadad'
+let s:Name_2_RGB['grey68'] = 'adadad'
+let s:Name_2_RGB['gray69'] = 'b0b0b0'
+let s:Name_2_RGB['grey69'] = 'b0b0b0'
+let s:Name_2_RGB['gray70'] = 'b3b3b3'
+let s:Name_2_RGB['grey70'] = 'b3b3b3'
+let s:Name_2_RGB['gray71'] = 'b5b5b5'
+let s:Name_2_RGB['grey71'] = 'b5b5b5'
+let s:Name_2_RGB['gray72'] = 'b8b8b8'
+let s:Name_2_RGB['grey72'] = 'b8b8b8'
+let s:Name_2_RGB['gray73'] = 'bababa'
+let s:Name_2_RGB['grey73'] = 'bababa'
+let s:Name_2_RGB['gray74'] = 'bdbdbd'
+let s:Name_2_RGB['grey74'] = 'bdbdbd'
+let s:Name_2_RGB['gray75'] = 'bfbfbf'
+let s:Name_2_RGB['grey75'] = 'bfbfbf'
+let s:Name_2_RGB['gray76'] = 'c2c2c2'
+let s:Name_2_RGB['grey76'] = 'c2c2c2'
+let s:Name_2_RGB['gray77'] = 'c4c4c4'
+let s:Name_2_RGB['grey77'] = 'c4c4c4'
+let s:Name_2_RGB['gray78'] = 'c7c7c7'
+let s:Name_2_RGB['grey78'] = 'c7c7c7'
+let s:Name_2_RGB['gray79'] = 'c9c9c9'
+let s:Name_2_RGB['grey79'] = 'c9c9c9'
+let s:Name_2_RGB['gray80'] = 'cccccc'
+let s:Name_2_RGB['grey80'] = 'cccccc'
+let s:Name_2_RGB['gray81'] = 'cfcfcf'
+let s:Name_2_RGB['grey81'] = 'cfcfcf'
+let s:Name_2_RGB['gray82'] = 'd1d1d1'
+let s:Name_2_RGB['grey82'] = 'd1d1d1'
+let s:Name_2_RGB['gray83'] = 'd4d4d4'
+let s:Name_2_RGB['grey83'] = 'd4d4d4'
+let s:Name_2_RGB['gray84'] = 'd6d6d6'
+let s:Name_2_RGB['grey84'] = 'd6d6d6'
+let s:Name_2_RGB['gray85'] = 'd9d9d9'
+let s:Name_2_RGB['grey85'] = 'd9d9d9'
+let s:Name_2_RGB['gray86'] = 'dbdbdb'
+let s:Name_2_RGB['grey86'] = 'dbdbdb'
+let s:Name_2_RGB['gray87'] = 'dedede'
+let s:Name_2_RGB['grey87'] = 'dedede'
+let s:Name_2_RGB['gray88'] = 'e0e0e0'
+let s:Name_2_RGB['grey88'] = 'e0e0e0'
+let s:Name_2_RGB['gray89'] = 'e3e3e3'
+let s:Name_2_RGB['grey89'] = 'e3e3e3'
+let s:Name_2_RGB['gray90'] = 'e5e5e5'
+let s:Name_2_RGB['grey90'] = 'e5e5e5'
+let s:Name_2_RGB['gray91'] = 'e8e8e8'
+let s:Name_2_RGB['grey91'] = 'e8e8e8'
+let s:Name_2_RGB['gray92'] = 'ebebeb'
+let s:Name_2_RGB['grey92'] = 'ebebeb'
+let s:Name_2_RGB['gray93'] = 'ededed'
+let s:Name_2_RGB['grey93'] = 'ededed'
+let s:Name_2_RGB['gray94'] = 'f0f0f0'
+let s:Name_2_RGB['grey94'] = 'f0f0f0'
+let s:Name_2_RGB['gray95'] = 'f2f2f2'
+let s:Name_2_RGB['grey95'] = 'f2f2f2'
+let s:Name_2_RGB['gray96'] = 'f5f5f5'
+let s:Name_2_RGB['grey96'] = 'f5f5f5'
+let s:Name_2_RGB['gray97'] = 'f7f7f7'
+let s:Name_2_RGB['grey97'] = 'f7f7f7'
+let s:Name_2_RGB['gray98'] = 'fafafa'
+let s:Name_2_RGB['grey98'] = 'fafafa'
+let s:Name_2_RGB['gray99'] = 'fcfcfc'
+let s:Name_2_RGB['grey99'] = 'fcfcfc'
+let s:Name_2_RGB['gray100'] = 'ffffff'
+let s:Name_2_RGB['grey100'] = 'ffffff'
+let s:Name_2_RGB['dark grey'] = 'a9a9a9'
+let s:Name_2_RGB['DarkGrey'] = 'a9a9a9'
+let s:Name_2_RGB['darkgrey'] = 'a9a9a9'
+let s:Name_2_RGB['dark gray'] = 'a9a9a9'
+let s:Name_2_RGB['DarkGray'] = 'a9a9a9'
+let s:Name_2_RGB['darkgray'] = 'a9a9a9'
+let s:Name_2_RGB['dark blue'] = '00008b'
+let s:Name_2_RGB['DarkBlue'] = '00008b'
+let s:Name_2_RGB['darkblue'] = '00008b'
+let s:Name_2_RGB['dark cyan'] = '008b8b'
+let s:Name_2_RGB['DarkCyan'] = '008b8b'
+let s:Name_2_RGB['darkcyan'] = '008b8b'
+let s:Name_2_RGB['dark magenta'] = '8b008b'
+let s:Name_2_RGB['DarkMagenta'] = '8b008b'
+let s:Name_2_RGB['darkmagenta'] = '8b008b'
+let s:Name_2_RGB['dark red'] = '8b0000'
+let s:Name_2_RGB['DarkRed'] = '8b0000'
+let s:Name_2_RGB['darkred'] = '8b0000'
+let s:Name_2_RGB['light green'] = '90ee90'
+let s:Name_2_RGB['LightGreen'] = '90ee90'
+let s:Name_2_RGB['lightgreen'] = '90ee90'
+
+function! forms#color#util#ConvertName_2_RGB(name)
+ let namelc = tolower(a:name)
+ if has_key(s:Name_2_RGB, namelc)
+ return s:Name_2_RGB[namelc]
+ else
+ return ''
+ endif
+endfunction
+
" ================
" Modelines: {{{1
" ================
View
6 autoload/forms/color/xterm88.vim
@@ -188,7 +188,7 @@ function! s:GetPartial_Int(n)
endif
endfunction
-function! forms#color#xterm#ConvertRGB_2_Int(rn, gn, bn)
+function! forms#color#xterm88#ConvertRGB_2_Int(rn, gn, bn)
"let start = reltime()
let rn = a:rn
let gn = a:gn
@@ -262,13 +262,13 @@ endfunction
" nr : String or Number or xterm 88 value
" value must be 0 <= value <= 88
" ------------------------------------------------------------
-function! forms#color#xterm#ConvertInt_2_RGB(nr)
+function! forms#color#xterm88#ConvertInt_2_RGB(nr)
if (type(a:nr) == g:self#NUMBER_TYPE)
return s:Int_2_RGB[a:nr]
elseif (type(a:nr) == g:self#STRING_TYPE)
return s:Int_2_RGB[a:nr]
else
- throw "forms#color#xterm#ConvertInt_2_RGB: Bad number: " . string(a:nsstr)
+ throw "forms#color#xterm88#ConvertInt_2_RGB: Bad number: " . string(a:nsstr)
endif
endfunction
View
31 autoload/forms/example/popdownlist.vim
@@ -5,12 +5,35 @@ function! forms#example#popdownlist#Make()
\ ["ONE", 1],
\ ["TWO", 2],
\ ["THREE", 3]
- \ ]
+ \ ],
+ \ 'pos' : 2
\ }
- let popdownlist = forms#newPopDownList(attrs)
+ let popdownlist1 = forms#newPopDownList(attrs)
+ let box1 = forms#newBox({ 'body': popdownlist1 })
- let box = forms#newBox({ 'body': popdownlist })
- let border = forms#newBorder({ 'body': box, 'size': 2 })
+ let attrs = {
+ \ 'choices' : [
+ \ ["ONE", 1],
+ \ ["TWO", 2],
+ \ ["THREE", 3],
+ \ ["FOUR", 4],
+ \ ["FIVE", 5],
+ \ ["SIX", 6],
+ \ ["SEVEN", 7],
+ \ ["EIGHT", 8],
+ \ ["NINE", 9],
+ \ ["TEN", 10]
+ \ ],
+ \ 'size' : 4,
+ \ 'pos' : 8
+ \ }
+ let popdownlist2 = forms#newPopDownList(attrs)
+ let box2 = forms#newBox({ 'body': popdownlist2 })
+
+ let hpoly = forms#newHPoly({'children': [box1, box2],
+ \ 'alignment': 'C' })
+
+ let border = forms#newBorder({ 'body': hpoly, 'size': 2 })
let bg = forms#newBackground({ 'body': border} )
let form = forms#newForm({'body': bg })
call form.run()
View
22 doc/forms.txt
@@ -1,7 +1,7 @@
*forms.txt* For Vim version 7.3 Last change: 2012 July 19
Author: Richard Emberson
-Version: 1.6
+Version: 1.7
Title: Forms Library
Homepage: TODO
@@ -1058,6 +1058,26 @@ and popup menus. The code is located in 'autoload/forms/menu.vim'.
==============================================================================
12. Release notes *forms-release-notes*
+1.7 - Fix: ~
+ Extended poldownlist example
+ Added <Leader>cc mapping for invoking ColorChooser to plugin
+ Changed function names in xterm88 to include "88" in names
+ Added map from color name to rgb values.
+ If log file in non-writeable directory, write to $HOME directory
+ Add logforce method which logs by-passing boolean guard
+ Added autoload action guard let g:forms_reload_highlights_on_colorscheme_event
+ Add function! g:ShouldLoadeHighlights() which loads
+ Checks if highlights should be loaded
+ Added foreground (light/dark) color variables
+ Added foreground color to some of the highlights
+ Added function allowing pattern to be directly used in defining highlight
+ Select list now starts display at it chosen postion, rather than always
+ at 0.
+ Popdown list now uses Select list (rather than menu) and is some
+ 500 to 1000 faster to build.
+ Background Glyph now takes optional bacground highlight
+ If its a read-only-file, then Forms converts it to read-file
+ and on Forms exit restores to read-only
1.6 - Fix: ~
Added support for 8 and 16 color terminals.
Works with non-unicode characters sets (there is some degradation).
View
2 plugin/forms.vim
@@ -7,3 +7,5 @@ vmap <Leader>p :call forms#menu#MakePopUp('v')<CR>
nmap <Leader>d :call forms#example#demo#Make()<CR>
+nmap <Leader>cc :call forms#dialog#colorchooser#Make()<CR>
+

0 comments on commit 2a06ba2

Please sign in to comment.
Something went wrong with that request. Please try again.