<commit_before><commit_msg>Add colortable utility<commit_after>function! s:load()
  let rgbfile = $VIMRUNTIME . '/rgb.txt'
  let table = {}
  if filereadable(rgbfile)
    for _ in map(filter(readfile(rgbfile), 'v:val !~ "^!"'), 'matchlist(v:val, "^\\s*\\(\\d\\+\\)\\s\\+\\(\\d\\+\\)\\s\\+\\(\\d\\+\\)\\s\\+\\(.*\\)")[1:4]')
      let table[tolower(_[3])] = _[0:2]
    endfor
  endif
  return table
endfunction

let s:table = s:load()

function! lightline#colortable#name_to_rgb(name)
  let name = tolower(a:name)
  return has_key(s:table, name) ? s:table[name] : []
endfunction
{'fraction_non_alphanumeric': 0.2512998266897747, 'fraction_numerical': 0.008665511265164644, 'mean_word_length': 3.515625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7227768', 'n_tokens_mistral': 245, 'n_tokens_neox': 238, 'n_words': 39}