Command reference
ed color
ed color opens Edith's system loupe and reads the swatch history it keeps:
every colour you have sampled, newest first, in whichever of the five
representations you ask for. Reach for it when you want to start a pick from
the terminal, copy a stored swatch, or move the latest result into a script or
stylesheet.
The history is stored in Edith's settings, so its list, copy, and clear operations work whether
or not the app is running. colour is an accepted spelling of the group, and
ed color with nothing after it is ed color ls.
ed color pick asks the running app to open the same colour sampler
as the eyedropper and hotkey (⌃⌥⌘C unless you have rebound it). The command
returns once the request is sent, while the pick finishes on the desktop.
At a glance
| Command | What it does |
|---|---|
ed color |
Runs ed color ls, which is the default subcommand. |
ed color pick |
Requests the system colour sampler from the running menu bar app. |
ed color ls |
Lists picked colours, newest first, as a table or as one chosen format per line. |
ed color copy |
Copies one numbered swatch using its configured or requested format. |
ed color clear |
Previews forgetting every picked colour; --yes applies it. |
ed colour is the same group under its British spelling, and ed color list
is the same command as ed color ls.
Commands
Exit codes
| Code | When this group produces it |
|---|---|
| 0 | The sampler request was sent, the listing printed, a swatch was copied, or the history was cleared. Also an empty listing, and help. |
| 2 | --limit was negative (--limit cannot be negative), or the command line was wrong in ArgumentParser's own terms: an unknown flag, --format or --limit with no value, or a --limit value that is not an integer. |
| 3 | --format named something that is not hex, rgb, hsl, swiftUI or nsColor, or copy named an index outside the history. |
| 4 | ed color pick found the extension off, copy found an empty history, or the pasteboard refused the value. |
Nothing in this group exits 1. Listing, copying, and clearing need no app, while picking is an app request and uses exit 4 when it cannot be delivered.
Notes and gotchas
- The history is stored in Edith's settings under
colorPickerHistory, as a JSON-encoded array of swatches. It is not a setting, soed config ls colorPickerlists the picker's seven preferences and never the history itself,ed config unsethas nothing to unset here, and neithered config exportnor Edith's own settings backup carries the swatches to another Mac. - Order is newest first because the app inserts each new swatch at the front
and truncates to
colorPickerHistorySize.edre-reads the store on every invocation and does no sorting of its own, so the first row is always the most recent pick. - Lowering
colorPickerHistorySizedoes not trim what is already stored. The cap is applied when the next colour is picked, so until thened color ls --limit 0can return more swatches than the setting allows. - Unreadable or absent stored data decodes to an empty history rather than to an error, so a corrupted key looks exactly like a picker you have never used.
- Every swatch is opaque. The formatters clamp each component to 0 through 1,
and
nsColoralways endsalpha: 1.0, because the loupe never records transparency. - The formatters do not convert between colour spaces. A
displayP3swatch and ansRGBswatch with the same components print identical hex, rgb and hsl strings; theprofilefield is what tells you which space those numbers are in. Set the space you sample in withed config set colorPickerProfile sRGB|displayP3. - Exact shapes, so you can match on them:
hexis#RRGGBBwith uppercase digits,rgbisrgb(76, 110, 245)with components rounded to 0 through 255,hslishsl(228, 89%, 63%)with integer degrees and percentages,swiftUIisColor(red: 0.2980, green: 0.4310, blue: 0.9610)andnsColorisNSColor(red: 0.2980, green: 0.4310, blue: 0.9610, alpha: 1.0), both with four decimal places. --formatis validated even when--jsonis passed, but it changes nothing about the output: with--jsonyou always gethex,rgbandhsl. Soed color ls --json --format nonsenseexits 3 whileed color ls --json --format hslis the same document ased color ls --json.- What the picker copies to the pasteboard when you sample is a separate
choice,
ed config set colorPickerCopyFormat hex|rgb|hsl|swiftUI|nsColor.ed color copyuses that choice unless--formatoverrides it. Changing it does not change whated color lsprints. - The picker only runs when its extension is on
(
ed extensions enable colorPicker, which is thecolorPickerEnabledsetting and wants the Screen Recording permission), but the history outlives the switch: turning the extension off stops new colours being recorded and leaves the ones already there readable. ed color ls --format hex --limit 8prints the last eight picks in hex.--helpworks on the group and on all four verbs, prints on stdout and exits 0.ed color pickis safe to request without a TTY because it never reads stdin, but the sampler still requires a person at the logged-in desktop.- Completion knows this group:
ed color ls --format <TAB>offershex,rgb,hsl,swiftUIandnsColor. A bareed color ls <TAB>offers them as well, because the completion tree hangs the format list off the command rather than off the flag;lsstill takes no positional argument, and passing one is an ArgumentParser error and exits 2.
Where to go next
ed clipboard, the other history Edith keeps for you, and the one with per-entry verbs.ed extensions, to turn the picker itself on or off.ed config, for the sevencolorPickersettings behind it.- All
edcommands.