Skip to content

Add userColor3 and userColor4 hat colors#3206

Open
trillium wants to merge 1 commit intocursorless-dev:mainfrom
trillium:add-user-colors-3-4
Open

Add userColor3 and userColor4 hat colors#3206
trillium wants to merge 1 commit intocursorless-dev:mainfrom
trillium:add-user-colors-3-4

Conversation

@trillium
Copy link
Contributor

@trillium trillium commented Mar 9, 2026

Add userColor3 and userColor4 hat colors

Summary

Add two additional user-configurable hat colors (userColor3 and userColor4) to Cursorless. Currently only 2 user-defined colors exist (userColor1/navy and userColor2/apricot), I use 4 colors and as a result am building the extension locally from my personal fork. Would be great if that step wasn't necessary.

Changes

  • Talon: Added userColor3 and userColor4 to color enablement defaults and spoken forms (cursorless-talon/src/marks/decorated_mark.py, cursorless-talon/src/spoken_forms.json)
  • Type definitions: Extended HatColor union type in all legacy command type files (V0V1, V2, V3)
  • Spoken form generation: Added default spoken form mappings for the new colors (cursorless-engine/src/generateSpokenForm/defaultSpokenForms/marks.ts)
  • VS Code extension: Added the new colors to all relevant package.json settings — light/dark color values, hat enablement booleans, hat penalties, and color enum list. Default colors: olive green (#6b8e23) and light gray (#e0e0e0)
  • Hat styles: Added to the HAT_COLORS const array (hatStyles.types.ts)
  • Docs: Updated the user-facing color table in README.md

Both new colors are disabled by default, matching the pattern of userColor1/userColor2.

Test plan

  • Verify VS Code loads without errors with default settings
  • Enable userColor3 and userColor4 in settings and confirm hats render with the configured colors
  • Assign custom spoken form names to the new colors (e.g., "white" → userColor3, "black" → userColor4) since the defaults are placeholder names — users must name their colors to use them
  • Confirm existing colors (including userColor1/userColor2) are unaffected
  • Run existing test suite

Add two additional user-configurable hat colors (userColor3, userColor4)
to support users who need more than 2 custom colors. Some users
configure colors like plum, teal, black, and white, exceeding the
current limit of 2 user-defined colors.
@trillium trillium marked this pull request as ready for review March 9, 2026 08:13
@trillium trillium requested a review from a team as a code owner March 9, 2026 08:13
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.

1 participant