ComfyUI Node

OKLCHPicker

Let CLIP name the colors on your gradient

By minujeong·Created 11 months ago·Updated 11 months ago· 1
OKLCHPicker
  • lch0
  • lch1
  • labels
  • gradient
candidatesred,green,blue
count3

The name says "picker", but don't come here expecting a color wheel you click. OKLCHPicker is a weirder, more interesting tool: you describe a color ramp, it draws the ramp, then asks CLIP to tell you which of your candidate words best describes it. It's a palette-naming and verification node, not a grabber.

Here's the mechanism, and it's a genuinely neat two-step. First it builds a 224×224 image from two endpoints, lch0 and lch1 - one column per step, interpolating lightness and chroma linearly and hue along the shortest arc (so red to violet goes through magenta, not the long way around), then converting each stop from OKLCH to sRGB with the proper matrix and gamma. That's the perceptually-uniform gradient the OKLCH space is famous for, and you get it as a real IMAGE output you can preview. Then it loads OpenAI's CLIP ViT-B/32, scores your candidate words against the image, and returns the best matches.

The inputs that matter:

  • lch0, lch1 (TUPLE) - the two color endpoints, straight out of the pack's own OKLCH node.
  • candidates (STRING, multiline) - comma-separated words to choose from, default red,green,blue.
  • count (INT, default 3) - how many top matches to return (capped at how many candidates you actually typed).

Outputs: labels (STRING, the winners comma-joined) and gradient (IMAGE, the 224×224 ramp - drop it into a Preview Image node to actually look at it, since you usually can't see a color you typed as a tuple).

Real-world uses: sanity-check a ramp you've designed ("I typed deep teal to warm amber - does it actually read that way?"), or get the closest English color words to drop straight into a prompt. Build a ramp from teal to amber, feed candidates like teal, cyan, turquoise, aqua, rust, orange, brick, amber, and let the node pick which ones genuinely match. CLIP is the same vision-language family as your checkpoint's text encoder, so think of it as an opinionated second pair of eyes.

Where people get burned:

  • First run downloads CLIP from HuggingFace - openai/clip-vit-base-patch32 is roughly 600 MB. No internet, no node. It's cached after that, but that first click hangs for a while and some people think it's broken.
  • CLIP lands in your VRAM. It loads onto the same device as your generation (via comfy.model_management.get_torch_device()), so expect a few hundred MB while it runs. Not a killer on any modern card, but it's not free.
  • CLIP's idea of a color name isn't yours. "Best" means best according to a vision-language model's training data. If it calls your carefully-crafted sunset ramp pumpkin, rust, brick, either that's a great prompt anyway or you need better candidates.
  • The candidate list parses on commas - whitespace is stripped and empty bits are dropped, so newlines are fine. Keep it comma-separated.

Install is genuinely painless, which is nice given how obscure this pack is. There's no README and no requirements.txt - it declares zero dependencies beyond what ComfyUI already ships (torch, torchvision, and transformers for the CLIP classes), and it's MIT. The author is minujeong, a tiny one-person effort with essentially no community footprint; this is a niche utility you install because you want it, not because everyone's running it. Through ComfyUI Manager, search "comfyui-oklch-color-picker". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/minujeong/comfyui-oklch-color-picker

Then restart ComfyUI. No model files to place - the only download is CLIP, and it fetches itself on first use.

Honest verdict: it's a weird little tool that earns its keep if you do palette work in graphs. If you wanted a clickable color picker, this isn't that - but if you've ever squinted at a gradient wondering what the heck to call it, CLIP has opinions and it's happy to share them.

CategoryOKLCH/Color

Inputs (4)

NameTypeDefaultDescription
candidatesSTRINGred,green,blue
countINT3
lch0TUPLE
lch1TUPLE

Outputs (2)

NameTypeDescription
labelsSTRING
gradientIMAGE