Skip to content

README's MapColors sample doesn't compile after the Semantics.Color migration (color.RgbValue), and the docs and demo still say non-neutral meanings use 50-90% of the range (code uses 20-82%) #115

Description

@matt-edmondson

Source plan

Step 2 of Task 5 in the colour-migration plan: docs/superpowers/plans/2026-06-29-themeprovider-semantics-color-migration.md L93-98 @ 4a4a26e``

Step 2: Update README.md (the color examples ~118-162 and the API table ~357), CLAUDE.md (lines ~34-37 referencing ColorMath.cs/SRgbColor.cs), DESCRIPTION.md, TAGS.md — remove deleted types, point at ktsu.Semantics.Color.

What exists today

The migration itself is done (29379bd, 1dcbce0, 69fdecb, 74b07bc, dff878f). Most of the docs were updated in dff878f and 791a288: the deleted types are gone from CLAUDE.md, and the API table points at ktsu.Semantics.Color.

What's missing

  1. The README sample still uses the old colour type's API. README.md:195 (the MapColors / custom colour-enum example) calls:
    result[kvp.Key] = ConvertToMyColor(color.RgbValue);
    color is now ktsu.Semantics.Color.Color, which has no RgbValue member (that belonged to the deleted PerceptualColor/RgbColor), so anyone who copies the sample gets CS1061.
  2. The documented lightness band is out of date. ee898f4 deliberately moved non-neutral meanings from 50-90% to 20-82% of the global range (SemanticColorMapper.cs:193-201). These places still say 50-90%:
    • CLAUDE.md:64
    • ThemeProvider/SemanticColorMapper.cs:158 (XML doc on the public API)
    • ThemeProvider.ImGui/ImGuiPaletteMapper.cs:81 (comment)
    • ThemeProvider.Demo/Program.cs:252, which is shown to users in the demo UI: "non-neutral uses 50-90% of global range"

Acceptance criteria (from the plan's "remove deleted types, point at ktsu.Semantics.Color")

  • The README MapColors sample compiles against the current API, for example ConvertToMyColor(color.ToSrgb()) or color.ToHex(), whichever the sample's MyColorType needs.
  • Every mention of the non-neutral lightness band says 20-82%, matching SemanticColorMapper.cs:200-201, or points at that code instead of repeating the numbers.
  • No other README/CLAUDE.md/DESCRIPTION.md/TAGS.md reference to a pre-migration type or member remains (grep -E "RgbValue|PerceptualColor|SRgbColor|RgbColor|OklabColor|ColorMath" finds nothing outside the plan and the changelog).

Dependencies

None. Every other task in the plan is implemented, so this is the only open item from it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions