Forked from https://github.com/evilmartians/oklch-picker, stuffed into an electron app, and modified into a Neovim plugin.
- Choose a color from your buffer and edit it in a graphical editor
- Works only with hex colors for now (e.g.
#RRGGBB
, short form and alpha also supported) - Picker uses the Oklch colorspace
- Motivation: An article by the Oklab creator
- Oklch uses the same theory as Oklab, but uses parameters that are easier to understand
- Blazing fast Note: Satisfaction not guaranteed. The first launch takes 2-6 seconds. After use it's not closed, but only hidden to avoid paying for slow startup multiple times. Sockets are used to coordinate the next picking. Memory usage is only about 1.5G. The same picker instance can be used for multiple Neovim instances.
brenoprata10/nvim-highlight-colors is a good companion for this plugin.
Node.js and npm are required.
{
'eero-lehtinen/oklch-color-picker-0.nvim',
build = 'npm install && npm run build',
opts = {},
},
Use :ColorPickOklch0
to pick a color under cursor, or call
require('oklch-color-picker-0').pick_color_under_cursor()
Keymaps you have to setup yourself, e.g.
vim.keymap.set('n', '<leader>p', require('oklch-color-picker-0').pick_color_under_cursor)
{
-- Minimize to tray after usage (set to false to minimize to taskbar)
use_tray = true,
-- What level of notifications to emit
log_level = vim.log.levels.INFO,
}