Skip to content

F14.1c — Add restricted-palette, luminance, and playability options #306

Description

@Flow-Fly

Parent: #129. Depends on the base guide generator from the previous F14.1 child.

Scope

Add advanced generation controls that let artists deliberately work with limited palettes while keeping normal presets enjoyable.

Implementation

  • Support an explicitly supplied restricted palette instead of generating colors.
  • Support two mapping modes:
    • color: perceptual color distance, the default;
    • luminance: luminance-only matching for intentionally restrictive ramps.
  • Add a deterministic one-pass cleanup for truly isolated single-cell noise without dithering.
  • Report a small guide-complexity summary such as paintable cells, palette size, and isolated-cell count.
  • Keep all options serializable so the setup can be reproduced after save/load.

Acceptance

  • Supplied palettes are never expanded or reordered.
  • Luminance mode only chooses colors from the supplied palette.
  • Cleanup removes isolated noise in fixtures without changing stable regions.
  • Complexity reporting is deterministic.
  • Tests cover two-color, monochrome-ramp, and small generated palettes.

Out of scope

Palette-picker UI, dithering, manual region editing, and gameplay.

Verification

  • Targeted Vitest coverage
  • npm run lint
  • git diff --check

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions