Save current project color to favorites
Saves the current project's Peacock color to your global favorites list for quick reuse. Use this after setting a color you want to keep for other projects.
/plugin marketplace add b-open-io/claude-peacock/plugin install peacock@b-open-ioSave the current project's Peacock color to your favorites list. Matches VSCode Peacock extension's saveColorToFavorites command.
/peacock:save-favorite
Optional with custom name:
/peacock:save-favorite magenta theme
Check for .vscode/settings.json:
ls .vscode/settings.json 2>/dev/null || echo "not found"
If not found:
❌ No Peacock color set for this project
Set a color first:
/peacock:change-color #8d0756
/peacock:random-color
Stop execution.
Extract current color:
jq -r '.["peacock.color"] // empty' .vscode/settings.json
Store as CURRENT_COLOR.
If arguments provided, use as favorite name. Otherwise, prompt for name or use color hex as name.
Check for ~/.claude/.peacock-favorites.json:
ls ~/.claude/.peacock-favorites.json 2>/dev/null || echo "not found"
If not found, create with empty array:
echo '[]' > ~/.claude/.peacock-favorites.json
Read existing favorites:
jq -c . ~/.claude/.peacock-favorites.json
Add new favorite (check for duplicates first):
jq --arg color "$CURRENT_COLOR" --arg name "$FAV_NAME" \
'. |
if any(.[]; .color == $color) then
.
else
. + [{name: $name, color: $color, added: now}]
end' \
~/.claude/.peacock-favorites.json > ~/.claude/.peacock-favorites.json.tmp
mv ~/.claude/.peacock-favorites.json.tmp ~/.claude/.peacock-favorites.json
Output:
✅ Saved to favorites: <color> (<name>)
Total favorites: <count>
Use your favorites:
/peacock:favorite-color
</instructions>