Skip to content

feat(color-picker): add color-picker extension - #404

Open
manuelcontrera wants to merge 3 commits into
vicinaehq:mainfrom
manuelcontrera:feat/add-color-picker
Open

manuelcontrera wants to merge 3 commits into
vicinaehq:mainfrom
manuelcontrera:feat/add-color-picker

Conversation

@manuelcontrera

Copy link
Copy Markdown

Summary

Adds the Color Picker extension adapted for Vicinae, supporting Linux, macOS, and Windows.

This extension brings a full suite of color manipulation, inspection, organization, and desktop color-picking tools directly into Vicinae.

Features

  • Pick Color (pick-color): Pick any color on your desktop with a magnifier/crosshair.
    • Linux Support: Native integration with Wayland (hyprpicker, grim+slurp, XDG Desktop Portal ColorPicker) and X11 (xcolor, gpick, import).
    • macOS / Windows: Native picker binary fallbacks.
    • Copies directly to clipboard in preferred format with optional desktop notifications and HUD.
  • Organize Colors (organize-colors): View and manage your color history.
    • Generates real-time color swatches (SVG data URIs compatible with Vicinae's renderer).
    • Copy or paste in multiple color formats (HEX, RGB, RGBA, HSL, HSV, OKLCH, LCH, P3).
    • Favorite, delete, edit titles, and view color details.
  • Favorite Colors (favorite-colors): Quick access to pinned / starred colors.
  • Convert Color (convert-color): Real-time conversion across all major color notations.
  • Color Names (color-names): Search and discover colors by human-readable names.
  • Color Wheel (color-wheel): Visual interactive color explorer.

Implementation Notes

  • Vicinae Compatibility: Replaced HTML canvas thumbnail generation with pure SVG data URIs so that color swatches render crisply across all Vicinae desktop environments.
  • Python / Portal Picker: Assets include picker-linux.py ensuring fallback support across Wayland compositors (Hyprland, Sway, GNOME, KDE) and X11 sessions.
  • Tested on Vicinae with @vicinae/api ^0.20.15. Passes vici lint and vici build.

@clankus-aurelius

clankus-aurelius commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks for contributing an extension to Vicinae! 👋

Before publication, this pull request receives two reviews:

  1. An automated review for extension guidelines, safety, error handling, and likely correctness issues.
  2. A final review from a Vicinae maintainer.

✅ Ready for human review. The automated reviewer approved the latest commit and a maintainer has been notified.

No blocking findings remain on the latest commit.

The automated reviewer examines only the current commit. New commits invalidate its previous decision and start another review.

@clankus-aurelius clankus-aurelius added the ai-reviewing Automated extension review is running label Sep 22, 2026

@clankus-aurelius clankus-aurelius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension has two publication-blocking behavior mismatches and uses evictable storage for user-managed color history.


Automated review found 2 publication-blocking issues.

This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.

Comment on lines +29 to +40
if (platform === "darwin") {
const candidate = candidateDirs
.map((dir) => path.join(dir, "picker-mac"))
.find((p) => existsSync(p));

binaryPath = candidate || "picker-mac";
} else if (platform === "win32") {
const candidate = candidateDirs
.map((dir) => path.join(dir, "picker-win.exe"))
.find((p) => existsSync(p));

binaryPath = candidate || "picker-win.exe";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Blocking — macOS and Windows pickers are not included

Rule: CORRECTNESS-001

The supplied assets contain only picker-linux.py. On macOS and Windows this code therefore falls back to executing undocumented PATH commands (picker-mac or picker-win.exe), so the advertised picker fails on ordinary installations.

Suggested resolution: Package and resolve the claimed native picker binaries, or remove macOS and Windows support claims and report those platforms as unsupported.

Comment on lines +133 to +137
"default": "hex",
"required": false,
"data": [
{
"title": "HEX - #FF6363",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Blocking — Color Wheel command is not an interactive color wheel

Rule: MANIFEST-001

The command is presented as an interactive wheel, but its implementation only displays a static image and immediately launches the same desktop screen picker used elsewhere. The image itself cannot select a color.

Suggested resolution: Implement interaction with the displayed wheel, or rename and describe the command as another screen-picker entry point.

Comment on lines +6 to +7
const MAX_HISTORY_LENGTH = 200;
const cache = new Cache();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Warning — Color history and favorites can be evicted

Rule: CORRECTNESS-001

All user-managed history, titles, and favorites are stored in Cache. The authoritative Vicinae documentation states that cache entries may be evicted at any time, while LocalStorage persists for the extension's lifetime.

Suggested resolution: Store the serialized history in LocalStorage and update the history hook asynchronously so user-organized data remains persistent.

@clankus-aurelius clankus-aurelius added ai-changes-requested Automated review found blocking issues and removed ai-reviewing Automated extension review is running labels Sep 22, 2026
@clankus-aurelius clankus-aurelius added ai-reviewing Automated extension review is running and removed ai-changes-requested Automated review found blocking issues labels Sep 23, 2026

@clankus-aurelius clankus-aurelius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prior blocking findings are resolved. One newly introduced documentation mismatch remains.


Automated extension review passed. A maintainer review is still required.

This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.

---

## Screen Picker Architecture

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Warning — Documented native picker fallbacks are not implemented

Rule: MANIFEST-001

The README claims fallbacks through hyprpicker, grim/slurp, xcolor, gpick, and import, but the supplied picker only attempts GNOME Shell and XDG Desktop Portal D-Bus APIs and never invokes those tools.

Suggested resolution: Remove the fallback-tool claim or implement the documented fallback paths.

Suggested change
- **Linux**: Uses D-Bus color picking through `org.freedesktop.portal.Screenshot.PickColor` and `org.gnome.Shell.Screenshot.PickColor`.

@clankus-aurelius clankus-aurelius removed the ai-reviewing Automated extension review is running label Sep 23, 2026
@clankus-aurelius

Copy link
Copy Markdown
Collaborator

@aurelleb automated review passed for 3b30b5c; this extension is ready for your review.

@clankus-aurelius clankus-aurelius added the human-reviewable Automated review passed; ready for maintainer review label Sep 23, 2026
@clankus-aurelius clankus-aurelius added ai-reviewing Automated extension review is running and removed human-reviewable Automated review passed; ready for maintainer review labels Sep 23, 2026

@clankus-aurelius clankus-aurelius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous documentation mismatch is resolved by the updated Linux picker description. No actionable issues were introduced by the incremental change.


Automated extension review passed. A maintainer review is still required.

This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.

@clankus-aurelius clankus-aurelius added human-reviewable Automated review passed; ready for maintainer review and removed ai-reviewing Automated extension review is running labels Sep 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-reviewable Automated review passed; ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants