Repository navigation
feat: change block factory colour picker and add HSV field option - #2782
Merged
Merged
Conversation
lizschwab
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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").
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.