Repository navigation
Conversation
… live drag, gamut fix A reimagined build of the official accent-picker by Teknium. - Full square chroma/lightness field (out-of-gamut pixels were painted transparent) - 'Save as theme': durable accent via retintTheme + the uiPreferences bridge (survives restarts) - Colors tab: every palette slot editable with the same OKLCH field, live while dragging - Per-slot Reset to default / Revert edit, Restore base theme, revert-last-edit command - Slot edits target the paletteFor(seed, resolvedMode) palette (renderedMode flips caused stuck colors) README documents the changes and credits the original.
- Slots no longer snap back on release: requestTheme(sameName) is a no-op that resolves stale data, so installations now select a unique per-color name while the durable record stays under the stable name; boot re-registers it and restores the selection after a crash. - Pointer capture on the element with React-driven down/move/up props; no window listeners to accumulate (the 'filling up with garbage' lag). - Hue rail is a static true-hue rainbow; the square gradient follows the rail's hue. - RGB/CMYK/HSV/HSL value readouts beside the hex field. Verified: 15 rapid drags leave zero dangling drags; background drag repaints the whole window (1.27M px diff); accent drag repaints app-wide; release holds the new color.
|
Fix update pushed ( Addresses the follow-up issues reported on the first build:
Paint verified by pixel diffing the live window: a background drag repainted the full screen (1.27M px), |
- The Accent tab swaps the decorative eight-square strip for grouped, labelled accents from real UIs: VS Code, Visual Studio, JetBrains, GitHub, Linear; Claude, OpenAI, Google; Notion, Slack, Figma, Stripe; Firefox, Discord, Shopify, Spotify. Clicking one seeds the OKLCH field and paints it live instead of a bare square. - New Presets tab mirrors Settings ▸ Appearance: every installed theme (built-ins plus imported/user themes) with a mode-aware accent dot and active marker, plus Auto/Light/Dark mode. Applying calls setTheme, so the preset persists per profile like a pick from the settings grid. Verified live: seeding VS Code painted #007ACC (RGB 0,122,204); reset restored #ECD300; applying GitHub selected #4f9e5e (github-dark); restoring Custom returned the user theme. Popover rendered with no clipping across all four accent groups and all presets.
|
Curated UI accents + UI presets tab (
Verified live: seeding VS Code painted |
… theme JSON share, and a Glass tab for window transparency - Surface squares in the first menu: one square per palette slot; hovering a square outlines every UI region that slot paints (single data-attr + injected stylesheet, no listeners); click opens the slot editor, which keeps the glow up for as long as it is open. - Per-slot copy/paste: copy badge on every square, right-click copies, editor gains Copy/Paste hex buttons (paste accepts #rrggbb from the clipboard and commits through the same undo/throttle path). - Share: copy the whole theme record as JSON and import one from the clipboard (menu buttons + two command-palette entries); imports are name-deduped and applied live via requestTheme(). - Glass tab: window transparency controls writing the app's own hermes.desktop.translucency.v2 book (mode glass/clear, intensity, fade, material, scope), throttled writes via the same bridge as the theme record, with an Apply - reload button since the renderer resolves translucency from storage only on window load. - version 1.1.0
…'s original height The surface grid + theme-JSON share row made the first menu ~200px taller. Both now live behind a collapsed 'Surfaces' toggle row; when opened the grid scrolls internally (max-h) instead of growing the popover.
…eaves pointerleave never fires when the hovered row (or the whole popover) unmounts under a still pointer, leaving data-apglow on <html> forever. Clear the glow on grid exit, on unmount, and when the pointer reaches the toggle row.
…anel one The Surfaces squares section is gone from the first menu. Panel one now glows what the accent paints while you hover/drag the field, rail or hex input; the existing Colors slot rows glow the region they recolor on hover. Theme-JSON share buttons moved into the Colors tab, and the glow is dropped on list exit, tab switch and popover unmount.
… matching unconditionally
"html[data-apglow='k'] a, b { }" only scopes "a": every selector after the
first comma (buttons, sidebar, inputs, ...) matched with no attribute set,
so the whole app glowed permanently. Prefix each selector instead.
The app's one-painter glass clears the sidebar surface token and paints <body> from --ui-bg-chrome on both columns, so a custom theme's sidebar slot never showed under glass (sidebar read as main at the tint level). When glass+sidebar scope is on, repaint the body gradient with the sidebar slot in the glass column; var() references keep it live with the tint slider and rail edge, and glass-off removes the inline paint.
|
Thanks @Ehco. Remembering the chosen accent landed via #358 (in #446). We're not turning Accent Picker into a full theme editor: it's about 1,600 lines working outside the plugin SDK, which we'd have to maintain against every Desktop change. A theme editor would make a good standalone catalog plugin built on the SDK. Closing. |
A reimagined build of the official accent-picker desktop plugin (original by @Teknium), keeping its OKLCH field, swatches and command structure, and turning the authoring-only picker into a full user-facing theme editor.
Changes and why
1. Full square chroma/lightness field
oklchToSrgb255returnsnulloutside sRGB, and the field painted those pixels transparent — for saturated hues a wedge of the panel vanished (screenshot-verified). Out-of-gamut pixels are now gamut-clipped per row againstmaxChroma(l, hue), keeping hue/lightness and always filling the square.2. Durable accent — 'Save as theme'
The original treats the accent as scratch state by design, so every pick was lost on restart. Save as theme re-derives the palette with the SDK's
retintThemeand installs it as a user theme — written throughwindow.hermesDesktop.uiPreferences(the host bridge) because a barelocalStorage.setItemon the sharedhermes-desktop-user-themes-v1key is clobbered by the ui-preferences sync's nextadopt().3. Colors tab — every palette slot
Background, sidebar, card, popover, border, input, etc. are editable with the same OKLCH field, targeting the palette
paletteFor(seed, resolvedMode)actually paints. Edits apply live while dragging (throttled to ~8 fps).4. Reset / Revert / Restore
Per-slot Reset to default and Revert edit, a Restore base theme button, and an Accent+: revert the last color edit palette command. Undo history capped at 25 entries.
Verification
Tested against the packaged desktop build by driving the UI over CDP: gamut-clipped field renders fully opaque; slot edits paint and persist (survives an app restart); reset/restore return to the base theme; no console errors.
src/still holds the original TSX and will be synced in a follow-up — the tested artifact isdesktop/plugin.js, which is what ships.Credit for the original plugin and design: Teknium / Nous Research. MIT.