Skip to content

feat(palette): 2.0.0 retune — neutrals, comments, ANSI, accents, CVD; verifier hard-fail - #14

Merged
crypticpy merged 5 commits into
mainfrom
feat/palette-2.0
Aug 18, 2026
Merged

feat(palette): 2.0.0 retune — neutrals, comments, ANSI, accents, CVD; verifier hard-fail#14
crypticpy merged 5 commits into
mainfrom
feat/palette-2.0

Conversation

@crypticpy

@crypticpy crypticpy commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

PR 3 of the audit-remediation plan (docs/plans/2026-08-18-audit-remediation.md). First palette change since 1.0 → 2.0.0. All edits are in themes/_src/variants/*.yaml (+ one tokenized key in base.yaml) and mirrored into the four terminal/ files. The verifier's perceptual checks introduced in #10 (APCA floors, CVD confusability, ANSI ΔE2000, tight-gap, whole-theme wavelength scan) are flipped to hard failures and the shipped palette passes all of them with zero warnings.

Standard / Focused (Soft gets the same transforms scaled — see CHANGELOG for its hexes):

  • Neutrals lose blue-subpixel drive — foreground/operator/punctuation grays shifted at constant L* with the B channel pulled down 10–20 hex (#C4B8A4→#C8B89A, #D4C8B8→#D8C8A8, #E8DCD0→#EDDCC4, …).
  • Comments #5C544A→#6E665B (APCA Lc 16 → 23, WCAG 2.7 → 3.5); doc comments →#787062; line numbers →#56504A.
  • Ghost text ≠ comments — fg #6B635A + faint translucent bg (editorGhostText.background, newly tokenized in base.yaml). Ghost italic is VS Code CSS, not themable.
  • Badge / remote fills #D4A048→#A87C34 (buttons, focus border, cursor keep gold).
  • *.defaultLibrary + this/self/super #B89860→#B08C50 — one real L* step below Types.
  • Numbers #E0A850→#DEA64E so Variables→Numbers clears the 3 L* tight-gap floor.
  • Parameters #BCA890→#B8AA9C — CVD vs Variables 4.7 → 6.6 (separation on the b* axis red-green observers keep).
  • Soft Functions #9A6D53→#976D56 (Soft Types/Functions CVD 5.7).
  • ANSI blue #9C948E (warm gray, Lc 45) / cyan #C08868 (terracotta = Functions); bright slots #B2AAA3 / #CEA284. Normal-8 pairwise ΔE2000 min 13.6 (was 5.2). Deviates from the plan's proposed #B09878/#C0A888 — two warm grays can't reach ΔE ≥ 10 at usable Lc, so cyan reuses an existing chromatic hex instead.
  • POLICY in scripts/verify-palette.mjs: every check fail. Tight-gap rule unchanged (L* < 3 or ΔE2000 < 4 fails).
  • tests/pipeline.test.mjs: v1.2.0 snapshot test now asserts structural parity (keys, rules, scopes, font styles) instead of hex equality; PALETTE_CHANGED gate removed.
  • README verifier blocks re-rendered; ladder prose made non-literal (Sourcery's drift comment on feat: verifier v2 (APCA, ΔE2000, CVD, ANSI, wavelength scan, README tables) + tests + CI #10); terminal section documents the new blue/cyan.
  • CHANGELOG [2.0.0] (folds the feat: verifier v2 (APCA, ΔE2000, CVD, ANSI, wavelength scan, README tables) + tests + CI #10 Unreleased entry); package.json 2.0.0.

themes/_snapshot/ is untouched (immutable v1.2.0 reference).

Verification

  • npm run check✓ all checks passed (0 failures, 0 warnings across Alone / Focused / Soft).
  • npm test → 26/26.
  • npx vsce package → 14 files, 50.7 KB.

🤖 Generated with Claude Code

Summary by Sourcery

Ship the 2.0.0 palette retune with stronger perceptual validation and warmer, more distinguishable colors across editor and terminal themes.

New Features:

  • Retune the shipped Alone, Alone Focused, and Alone Soft palettes with warmer neutrals, clearer comments and ghost text, refined accents, and more distinguishable ANSI colors.
  • Add a tokenized ghost-text background and publish the palette as version 2.0.0.

Bug Fixes:

  • Improve readability and perceptual separation for comments, numbers, parameters, default-library symbols, and terminal ANSI colors across accessibility and color-vision checks.

Enhancements:

  • Make APCA, CVD, ANSI contrast, tight-gap, and wavelength-scan verifier checks hard failures.
  • Preserve immutable snapshot coverage through structural parity checks while allowing intentional palette value changes.

Documentation:

  • Update the README and changelog with the retuned syntax, contrast, ANSI, and verification information.

Tests:

  • Update pipeline tests to validate structural snapshot coverage instead of exact color equality.

Chores:

  • Mirror the retuned palette across generated themes and terminal color schemes.

crypticpy and others added 3 commits August 18, 2026 01:41
- Neutrals shifted at constant L* to drop residual blue-subpixel drive
  (fg #C4B8A4→#C8B89A, ops #D4C8B8→#D8C8A8, bright #E8DCD0→#EDDCC4, …).
- Comments #5C544A→#6E665B (Lc 16→23), doc comments →#787062,
  line numbers →#56504A; Soft comments →#625A50.
- Ghost text fg #6B635A + translucent bg (new tokenized
  editorGhostText.background).
- Badge/remote fills #D4A048→#A87C34; defaultLibrary/this #B89860→#B08C50.
- Numbers #E0A850→#DEA64E (Variables→Numbers gap ≥ 3 L*).
- Parameters #BCA890→#B8AA9C (CVD vs Variables 4.7→6.6);
  Soft Functions #9A6D53→#976D56.
- ANSI blue #9C948E, cyan #C08868, brightBlue #B2AAA3, brightCyan
  #CEA284 (normal-8 pairwise ΔE2000 ≥ 10); terminal/* mirrored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- POLICY: every check now `fail` (tightGap/apca/cvd/ansi/wavelengthScan).
- pipeline test checks v1.2.0 snapshot structure (keys, rules, scopes,
  fontStyles) instead of hex equality; PALETTE_CHANGED gate removed.
- README verifier blocks re-rendered; ladder/terminal prose updated.
- CHANGELOG [2.0.0]; version bump.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…dered block)

Addresses Sourcery general comment on PR #10.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Reviewer's Guide

Palette 2.0.0 retune that warms neutrals, raises comment/ghost/line-number contrast, reworks ANSI blue/cyan and accents, and tightens verification/tests so all perceptual checks are now hard failures. All user-visible changes are in the YAML variants and mirrored terminal schemes; tests and verifier now treat v1.2.0 JSON as a structural reference rather than hex snapshot.

File-Level Changes

Change Details Files
Warm-neutral palette retune across Alone / Focused / Soft variants, including comments, parameters, numbers, ghost text, and UI neutrals.
  • Shifted core neutral foreground, operator, punctuation, and UI grays (variables, properties, punctuation, UI chrome) from slightly blue-tinted values to warmer hexes at roughly constant L* to remove blue-subpixel drive while preserving contrast.
  • Raised comment/CodeLens/line-number tones and ANSI bright-black to meet APCA/WCAG floors; comments and documentation comments now differ in hex and L*, and comments remain visually de-emphasized but above the non-essential text floor.
  • Adjusted numbers and parameter colors so Variables→Numbers and Variables→Parameters clear the tight-gap ΔE/L* constraints while remaining harmonized with the rest of the syntax ladder.
  • Introduced distinct ghost-text foreground plus new tokenized editorGhostText.background, and wired it via base.yaml so inline suggestions are perceptually distinct from comments and body text in all variants.
  • Tweaked Soft variant neutrals and soft functions to mirror the main palette moves with scaled deltas, maintaining CVD separation for Types/Functions and other tight pairs.
themes/_src/variants/alone.yaml
themes/_src/variants/alone-focused.yaml
themes/_src/variants/alone-soft.yaml
themes/_src/base.yaml
Accent and ANSI palette adjustments, applied consistently to VS Code themes and terminal schemes.
  • Dimmed solid accent fills for badges and remote indicators from bright gold to a darker gold while keeping buttons, focus borders, and cursor unchanged, reducing large bright UI blocks without harming affordance.
  • Replaced previous near-identical warm-gray ANSI blue/cyan pair with a warm-gray blue and terracotta cyan, and updated corresponding bright/dim slots to ensure ΔE2000 ≥ 10 among all normal ANSI colors and improved readability on black backgrounds.
  • Mirrored the new foreground, blue, cyan, white, and bright-black/white ANSI values into Alacritty, Kitty, iTerm2, and Windows Terminal theme files, including dim palettes where present.
  • Updated README documentation for the syntax ladder, syntax color table, ANSI table, and contrast examples to reflect new hex values and to describe the new blue/cyan strategy in text.
themes/_src/variants/alone.yaml
themes/_src/variants/alone-focused.yaml
themes/_src/variants/alone-soft.yaml
terminal/alone.toml
terminal/alone.conf
terminal/alone.itermcolors
terminal/alone-windows-terminal.json
README.md
Verifier policy tightened so perceptual checks hard-fail, with README regeneration and structural test expectations updated accordingly.
  • Changed verify-palette POLICY configuration so all perceptual checks (tight gaps, APCA floors, CVD separation, ANSI ΔE, wavelength scan) are treated as fail-level, and updated header comments to reflect 2.0.0 semantics.
  • Switched base.yaml editorGhostText.background from a hard-coded transparent black to a token reference so each variant can supply its ghost background color while keeping the mapping centralized.
  • Reworked the pipeline snapshot test to compare structural shape (keys, tokenColors rules, semantic selectors, font styles) between current themes and the immutable v1.2.0 snapshot instead of enforcing hex equality, and removed the PALETTE_CHANGED gate/skip flag.
  • Ensured README verifier-generated sections remain the single source of truth by rerunning verify-palette with --write-readme and tightening the readme drift policy to fail on mismatches.
  • Bumped package.json version to 2.0.0 and updated CHANGELOG with a detailed 2.0.0 entry describing both palette retune and verifier/test pipeline behavior changes; package-lock and built themes JSON updated by the build pipeline.
scripts/verify-palette.mjs
themes/_src/base.yaml
tests/pipeline.test.mjs
README.md
CHANGELOG.md
package.json
package-lock.json
themes/alone-color-theme.json
themes/alone-focused-color-theme.json
themes/alone-soft-color-theme.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The new structural parity test still depends on the exact tokenColors array order, so any future reordering of rules (even if semantically equivalent) will fail the test; consider normalizing/sorting tokenColors (e.g. by name/scope) before comparison so the check is order-insensitive but still guards scope/fontStyle drift.
  • shape(theme).colors currently enforces an exact color-key set match with the v1.2.0 snapshot, which will flag intentional additions like new VS Code color keys; you might want to allow supersets (e.g. assert that snapshot keys are a subset of built keys) so the test doesn’t block forward compatibility.
  • Since all verifier checks are now hard failures, it may be worth adding a short-lived override mechanism (e.g. an env flag) instead of requiring POLICY edits when experimenting with in-flight palette changes, to reduce the chance of accidentally committing relaxed policies.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new structural parity test still depends on the exact `tokenColors` array order, so any future reordering of rules (even if semantically equivalent) will fail the test; consider normalizing/sorting `tokenColors` (e.g. by `name`/`scope`) before comparison so the check is order-insensitive but still guards scope/fontStyle drift.
- `shape(theme).colors` currently enforces an exact color-key set match with the v1.2.0 snapshot, which will flag intentional additions like new VS Code color keys; you might want to allow supersets (e.g. assert that snapshot keys are a subset of built keys) so the test doesn’t block forward compatibility.
- Since all verifier checks are now hard failures, it may be worth adding a short-lived override mechanism (e.g. an env flag) instead of requiring `POLICY` edits when experimenting with in-flight palette changes, to reduce the chance of accidentally committing relaxed policies.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cbe87fae3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/pipeline.test.mjs Outdated
Comment on lines +65 to +66
Object.entries(theme.semanticTokenColors).map(([k, v]) => [
k, typeof v === 'string' ? null : (v.fontStyle ?? null),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve semantic token style flags in snapshot shape

Record the actual semantic-token style properties rather than fontStyle. The generated themes represent these styles as italic, bold, underline, and strikethrough booleans (for example, comment has italic: true and keyword has bold: true), so every current object maps to null here. Consequently, a future change that silently removes or alters a semantic selector's visual style will still pass this structural-parity test despite the stated invariant.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 244a3d0: the shape now records the italic/bold/underline/strikethrough flags (16 styled selectors in the snapshot are now actually compared).

…ourcery on PR #14)

Compare the v1.2.0 snapshot by name-keyed rule signatures and colour-key
membership instead of sorted-array deepEqual, so rule reordering and new
VS Code colour keys/rules/selectors don't fail the test while drops and
restyles still do.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@crypticpy

Copy link
Copy Markdown
Owner Author

Re Sourcery review 4958052317:

  • Order-sensitive / exact-set snapshot test: fixed in 214a950 — the test now compares name-keyed rule signatures and colour-key membership (snapshot ⊆ built), so reordering and additions pass while drops/restyles still fail.
  • Env-flag override for POLICY: leaving as-is. A POLICY edit shows up in the diff and gets reviewed; an env var can relax the gate in CI or a shell without any trace in the repo, which is the failure mode we want to avoid. The header comment documents the intended flow (demote to warn in the PR that changes the palette, restore in the same PR).

)

semanticTokenColors entries carry italic/bold/underline/strikethrough as
booleans, so the previous fontStyle read was always null and the style
comparison was vacuous.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@crypticpy
crypticpy merged commit 1ef14d6 into main Aug 18, 2026
3 checks passed
@crypticpy
crypticpy deleted the feat/palette-2.0 branch August 18, 2026 07:02
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