Skip to content

Add //color command for native color picking and hex insertion#97

Closed
da-ba with Copilot wants to merge 2 commits into
mainfrom
copilot/add-color-picker-command
Closed

Add //color command for native color picking and hex insertion#97
da-ba with Copilot wants to merge 2 commits into
mainfrom
copilot/add-color-picker-command

Conversation

Copilot AI commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

This adds a new slash command to let users pick a color and insert hex codes like #EDEDED directly into GitHub markdown textareas. The command is implemented as a setup-panel flow using a native color input plus editable hex value.

  • Command behavior

    • Adds //color command registration and loading in the content script.
    • preflight() always opens a command-specific setup panel instead of grid/list results.
    • Inserts selected color as uppercase #RRGGBB; invalid manual input falls back to #EDEDED.
  • UI + insertion flow

    • Setup panel includes:
      • native <input type="color">
      • hex text input (#RRGGBB)
      • Insert action
    • Pressing Enter in the hex field also inserts the normalized color.
  • Tests

    • Adds focused unit tests for:
      • setup-panel preflight behavior
      • hex normalization
      • invalid-input fallback
      • insert callback wiring
  • Docs

    • Adds command docs at docs/commands/color/README.md.
    • Updates command listings in docs/commands/README.md and top-level README.md.
const normalized = normalizeHexColor(hexInput.value)
insertTextAtCursor(normalized)
// e.g. "#00ff00" -> "#00FF00"

//color command UI

Original prompt

This section details on the original issue you should resolve

<issue_title>Add color picker command</issue_title>
<issue_description>Add a command that opens a color picker for then insert color codes like #EDEDED.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: da-ba <17434220+da-ba@users.noreply.github.com>
Copilot AI changed the title [WIP] Add command to open color picker for color codes Add //color command for native color picking and hex insertion Feb 22, 2026
Copilot AI requested a review from da-ba February 22, 2026 19:57
@github-actions
github-actions Bot temporarily deployed to pr-97 February 22, 2026 20:42 Destroyed
@github-actions

Copy link
Copy Markdown
Contributor

🎨 Demo Preview Deployed

A live preview of this PR is available at:

🔗 https://da-ba.github.io/gsp/pr-97-4068aba/

Version: 0.0.6 | Build: PR#97@4068aba


🤖 This preview is automatically updated on each push. View all deployments at the index page.

@da-ba da-ba closed this Mar 26, 2026
@da-ba
da-ba deleted the copilot/add-color-picker-command branch March 26, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add color picker command

2 participants