Skip to content

feat: change block factory colour picker and add HSV field option - #2782

Merged
zspriggs merged 3 commits into
RaspberryPiFoundation:mainfrom
zspriggs:swap-color-block
Nov 23, 2026
Merged

zspriggs merged 3 commits into
RaspberryPiFoundation:mainfrom
zspriggs:swap-color-block

Conversation

@zspriggs

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #2554

Proposed Changes

Changes the field angle color picker on the block factory to be the hsv sliders color picker instead.

Also, I added the HSV color sliders as a field option in addition to the regular color field. (The HSV colour field is "colour sliders", kept the old field as "colour").

Screenshot 2026-11-23 at 10 44 52 AM

Also updated Blockly to 13.5.0

Reason for Changes

The angle color picker was very limiting, as it had a fixed saturation and brightness. The new HSV sliders allow users of the block factory to pick any color.

For backwards compatibility, I didn't remove any of the code for the old angle color block, so saved projects should not be affected. I also left one of the old angle color blocks in the toolbox, so that if someone prefers it they can still use it.

The HSV color block can be added from the toolbox to existing blocks, and it will be the default color block when a new block is created. Note that I subclassed the HSV field to add a white outline so that if the selected color is similar to the block it remains visible.

Test Coverage

Documentation

Additional Information

I added multiple instances of the HSV sliders in the "Colour" category to mimic the style of the existing category, which is aesthetically nice but maybe not super useful. I'm happy to reduce the number of these blocks in the toolbox if needed.

Screenshot 2026-11-23 at 10 59 31 AM

@zspriggs
zspriggs requested a review from a team as a code owner November 23, 2026 17:43
@zspriggs
zspriggs requested review from lizschwab and removed request for a team November 23, 2026 17:43
@zspriggs zspriggs changed the title chore: switch block factory colour picker feat: change block factory colour picker and add HSV field option Nov 23, 2026
@zspriggs
zspriggs merged commit f061004 into RaspberryPiFoundation:main Nov 23, 2026
4 checks passed
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.

Replace Angle Field hue block with actual color block in Block Factory

2 participants