Add userColor3 and userColor4 hat colors#3206
Add userColor3 and userColor4 hat colors#3206AndreasArvidsson merged 4 commits intocursorless-dev:mainfrom
Conversation
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.
|
I updated the placeholder names with something that would at least not error in conformer. Otherwise unless you have a good suggestion I'm fine with this. The number of users that need these many colors are few and definitely classified as power users. |
|
Thanks Andreas! I use purple (aliased plum) and black/white/teal with a border color and a larger penalty so they don't render on shaped hats since the border eats the inner color and isn't very distinguishable. I think it's black/white/teal have a penalty of 1, and shapes have a penalty of 2, with a cap of 3? Something like that Default colors + plum > black/white/teal > shaped hats > shaped hats with colors I find the colors stay in my brain a little easier than the shapes so I wanted more of them. It's working great :) Thanks Andreas! |
|
That's interesting because I don't have any user colors on and I still mix green and blue up sometimes. I believe Pokey has disabled one of those for the same reason. Running with all shapes works great for us though. I guess everyone is different :) Do you want me to merge? |
|
Yes please :) |
## 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 - [x] Verify VS Code loads without errors with default settings - [x] 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 - [x] Confirm existing colors (including userColor1/userColor2) are unaffected - [x] Run existing test suite --------- Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>




Add userColor3 and userColor4 hat colors
Summary
Add two additional user-configurable hat colors (
userColor3anduserColor4) to Cursorless. Currently only 2 user-defined colors exist (userColor1/navy anduserColor2/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
userColor3anduserColor4to color enablement defaults and spoken forms (cursorless-talon/src/marks/decorated_mark.py,cursorless-talon/src/spoken_forms.json)HatColorunion type in all legacy command type files (V0V1, V2, V3)cursorless-engine/src/generateSpokenForm/defaultSpokenForms/marks.ts)package.jsonsettings — light/dark color values, hat enablement booleans, hat penalties, and color enum list. Default colors: olive green (#6b8e23) and light gray (#e0e0e0)HAT_COLORSconst array (hatStyles.types.ts)README.mdBoth new colors are disabled by default, matching the pattern of
userColor1/userColor2.Test plan
userColor3anduserColor4in settings and confirm hats render with the configured colorsuserColor3, "black" →userColor4) since the defaults are placeholder names — users must name their colors to use them