andrewjensen / light-blocks

Control Philips Hue lights with Blocks!
4 stars 1 forks source link

Create new color picker block #1

Closed andrewjensen closed 2 years ago

andrewjensen commented 2 years ago

This replaces the color_simple block with a new color_picker block with a custom color picker.

The old block used the built-in Blockly.FieldColour field type, but the new block uses a custom field type, FieldColorComponents. The new implementation includes sliders for hue, saturation, and brightness color components, which is better-aligned with the rest of the HSB paradigm in the app, and gives more granular control.