-
Notifications
You must be signed in to change notification settings - Fork 4
CLI Color
ed color reads the swatch history Edith's colour picker keeps: every colour
you have sampled with the loupe, newest first, in whichever of the five
representations you ask for. Reach for it when you want the colour you just
picked to land in a script or a stylesheet rather than on the pasteboard.
The history is one key in Edith's shared defaults suite
(com.pulkit.edith.shared), so both verbs 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.
Sampling a colour is not here. The loupe is NSColorSampler, which belongs to
the app, so picking stays on the eyedropper in the menu bar panel and on the
hotkey (⌃⌥⌘C unless you have rebound it). ed reads what the loupe recorded,
and can forget it.
| Command | What it does |
|---|---|
ed color |
Runs ed color ls, which is the default subcommand. |
ed color ls |
Lists picked colours, newest first, as a table or as one chosen format per line. |
ed color clear |
Forgets every picked colour. |
ed colour is the same group under its British spelling, and ed color list
is the same command as ed color ls.
| Code | When this group produces it |
|---|---|
| 0 | The listing printed, or the history was cleared. Also an empty history, and ed color ls --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. |
Nothing in this group exits 1 or 4: there is no remote call, no app request and no write that can be refused.
- The history lives at the
colorPickerHistorykey of thecom.pulkit.edith.shareddefaults suite, 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.--formathere does not change it, and 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. - The eyedropper's context menu in the menu bar panel lists the last eight
picks in hex, so
ed color ls --format hex --limit 8prints exactly what that menu shows. -
--helpworks on the group and on both verbs, prints on stdout and exits 0. - 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.
-
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.
Auto-generated from docs/, edit the docs in the repo, not the wiki.
CLI reference
Companion
- Deploy
- Concepts
- Concepts Memory
- Concepts Ingestion
- Concepts Search
- Concepts Chat
- Concepts Learning
- Concepts Brain
- Concepts Friend
- Hosts
- Stack
- Status
- Doctor
- Search
- Index
- Ingest
- Episodes
- Sync
- Observations
- Reflect
- Beliefs
- Ask
- Extract
- Claims
- Corroborate
- Runs
- Chat
- Conversations
- Forget
- Export
- Import
- Erase
- Wipe
- Episode
- Nightly
- Reason
- Personas
- Council
- Lenses
- Core
- Why
- Hypotheses
- Predictions
- Commitments
- Discrepancies
- Calibration
- Inquire
- Entities
- Eval
- Standup
- Machines
- Baselines
- Connectors
- Facts
- Correct
- Weekly
- Db
Guides