maxmx03
86

solarized.nvim

solarizedlua
12
vim.cmd [[ set background=dark ]]vim.cmd [[ colorscheme solarized ]]
NORMALinit.luaunixutf-8 0% 0:2
123456789101112
" Returns true if the color hex value is light
function! IsHexColorLight(color) abort
let l:raw_color = trim(a:color, '#')

let l:red = str2nr(substitute(l:raw_color, '(.{2}).{4}', '1', 'g'), 16)
let l:green = str2nr(substitute(l:raw_color, '.{2}(.{2}).{2}', '1', 'g'), 16)
let l:blue = str2nr(substitute(l:raw_color, '.{4}(.{2})', '1', 'g'), 16)

let l:brightness = ((l:red * 299) + (l:green * 587) + (l:blue * 114)) / 1000

return l:brightness > 155
endfunction
NORMALcode.vimunixutf-850%6:12
Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications. Solarized port for Neovim

More from solarized.nvim

solarized (light)lua
12
vim.cmd [[ set background=light ]]vim.cmd [[ colorscheme solarized ]]
NORMALinit.luaunixutf-8 0% 0:2
123456789101112
" Returns true if the color hex value is light
function! IsHexColorLight(color) abort
let l:raw_color = trim(a:color, '#')

let l:red = str2nr(substitute(l:raw_color, '(.{2}).{4}', '1', 'g'), 16)
let l:green = str2nr(substitute(l:raw_color, '.{2}(.{2}).{2}', '1', 'g'), 16)
let l:blue = str2nr(substitute(l:raw_color, '.{4}(.{2})', '1', 'g'), 16)

let l:brightness = ((l:red * 299) + (l:green * 587) + (l:blue * 114)) / 1000

return l:brightness > 155
endfunction
NORMALcode.vimunixutf-850%6:12