Skip to content

Add controlled ColorPicker with Inspector Display color - #194

Merged
snkmcb merged 2 commits into
mainfrom
codex/color-picker
Nov 10, 2026
Merged

snkmcb merged 2 commits into
mainfrom
codex/color-picker

Conversation

@snkmcb

@snkmcb snkmcb commented Nov 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Core HsvColor (hue in degrees; saturation/value of the sRGB components) with valid, to_color and format_hex_color.
  • authoring::ColorPicker returns an inline trigger (swatch + #RRGGBB) and a root-sibling panel with a saturation/value area (pure hue under white/black gradient overlays) and a hue strip, with input-transparent thumbs and labels stating their values.
  • Additive color_picker role (hex value, expanded) in UI JSON v1, semantics, Semantic JSON v1, Replay v1/v2 and inspection/invariant targets; the panel reuses group.
  • ColorPickerDispatcher: opens at the area, captures primary presses on either control (clamped, rounded to 0.0001 / 0.01°), arrows/Home/End/gamepad steps, Tab between the controls, ComboBox-style dismissal plus Enter. Changes apply live; closing does not revert.
  • Inspector: per-item Display color (USD fallback 50% gray) on the Display tab, included in the Modified badge and Reset.
  • Docs: new ColorPicker guide, Inspector guide section, semantics/ui-model/input/format vocabulary, support matrix row, testing table, changelog, backlog follow-ups.

Gradients interpolate in linear light, so the panel fills approximate the sRGB HSV model. The CPU-measured deviation is at most 24/255 inside the area, 8/255 for the largest/smallest components and 5/255 on the hue strip. The swatch, value and thumbs are exact.

Validation (Windows x64, VS 2026)

  • Debug: 96/97 ctest passed. inspector_hierarchy_native hit its 60 s CTest timeout. This is not new: on unmodified main the same native smoke takes about 2 minutes in Debug on this machine. Run directly, it passes with these changes (133 presentations).
  • Release: 95/95 non-native and both native smokes passed (Inspector native smoke in 24 s).
  • New owner test color_picker covers the model, composition, semantics, CPU pixels, codecs, dispatcher input and rejection.

Out of scope: hex/channel entry, alpha, revert on Escape, numeric range semantics, GPU comparison, native accessibility.

🤖 Generated with Claude Code

snkmcb and others added 2 commits November 10, 2026 15:29
Add core HsvColor (hue degrees and saturation/value of the sRGB
components) with to_color and format_hex_color, and
authoring::ColorPicker returning an inline trigger (swatch and #RRGGBB
value) and a root-sibling panel. The panel holds a saturation/value area,
drawn as the pure hue under white and black gradient overlays, and a hue
strip, with input-transparent thumbs and labels stating their values.

The additive color_picker role carries the hex value and expanded state
through UI JSON v1, semantics, Semantic JSON v1, Replay v1/v2 and
inspection/invariant targets; the panel is a group. ColorPickerDispatcher
opens at the area, captures primary presses on either control, maps
arrows, Home/End and gamepad directions to configurable steps, rounds
requested values, moves between the controls with Tab and dismisses like
ComboBox, plus Enter.

The Inspector adds a per-item Display color on the Display tab, included
in the Modified badge and Reset, with window-free and injected native
smokes. The owner test bounds the CPU area and hue strip deviation from
the sRGB model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snkmcb
snkmcb merged commit 4ea6eda into main Nov 10, 2026
3 checks passed
@snkmcb
snkmcb deleted the codex/color-picker branch November 10, 2026 11:58
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.

1 participant