Skip to content

feat: add color blind accessibility command suite#6

Merged
HeyItsGilbert merged 3 commits intomainfrom
claude/terminal-color-accessibility-gC1q2
Mar 13, 2026
Merged

feat: add color blind accessibility command suite#6
HeyItsGilbert merged 3 commits intomainfrom
claude/terminal-color-accessibility-gC1q2

Conversation

@HeyItsGilbert
Copy link
Copy Markdown
Contributor

Implements 11 new commands across 4 tiers covering the full accessibility
surface described in the module manifest (colorblindness, screen readers,
contrast analysis, and profile management).

Tier 1 - Color accessibility (primary):

  • Set-ColorBlindProfile: applies Okabe-Ito based color schemes for
    Deuteranopia, Protanopia, Tritanopia, Achromatopsia, and AccessibleDefault;
    supports -Persist flag to write to $PROFILE for session persistence
  • Get-ColorBlindProfile: returns the active profile and its color table
  • Reset-ColorProfile: restores PSStyle formatting colors to PS defaults

Tier 2 - Text & reading:

  • ConvertTo-PlainText: strips all ANSI escape codes (screen reader prep)
  • Enable-ScreenReaderMode / Disable-ScreenReaderMode: toggle PSStyle
    OutputRendering to PlainText for screen reader compatibility

Tier 3 - Contrast analysis tools:

  • Test-ColorContrast: calculates WCAG 2.1 contrast ratio between two RGB
    colors and reports AA/AAA compliance (uses private WCAG math helpers)
  • Get-ColorBlindPalette: returns the full color table for a named profile

Tier 4 - Profile management:

  • Get-AccessibilityProfile: snapshot of all active module settings
  • Export-AccessibilityProfile / Import-AccessibilityProfile: JSON
    serialization for sharing and restoring configurations

Private helpers added:

  • Get-ColorBlindPaletteData: shared Okabe-Ito palette data store
  • Get-RelativeLuminance: W3C WCAG 2.1 relative luminance formula
  • Get-ContrastRatio: W3C WCAG 2.1 contrast ratio formula

https://claude.ai/code/session_016yUMp2eoEEdVpEPAE98hDA

Implements 11 new commands across 4 tiers covering the full accessibility
surface described in the module manifest (colorblindness, screen readers,
contrast analysis, and profile management).

Tier 1 - Color accessibility (primary):
- Set-ColorBlindProfile: applies Okabe-Ito based color schemes for
  Deuteranopia, Protanopia, Tritanopia, Achromatopsia, and AccessibleDefault;
  supports -Persist flag to write to $PROFILE for session persistence
- Get-ColorBlindProfile: returns the active profile and its color table
- Reset-ColorProfile: restores PSStyle formatting colors to PS defaults

Tier 2 - Text & reading:
- ConvertTo-PlainText: strips all ANSI escape codes (screen reader prep)
- Enable-ScreenReaderMode / Disable-ScreenReaderMode: toggle PSStyle
  OutputRendering to PlainText for screen reader compatibility

Tier 3 - Contrast analysis tools:
- Test-ColorContrast: calculates WCAG 2.1 contrast ratio between two RGB
  colors and reports AA/AAA compliance (uses private WCAG math helpers)
- Get-ColorBlindPalette: returns the full color table for a named profile

Tier 4 - Profile management:
- Get-AccessibilityProfile: snapshot of all active module settings
- Export-AccessibilityProfile / Import-AccessibilityProfile: JSON
  serialization for sharing and restoring configurations

Private helpers added:
- Get-ColorBlindPaletteData: shared Okabe-Ito palette data store
- Get-RelativeLuminance: W3C WCAG 2.1 relative luminance formula
- Get-ContrastRatio: W3C WCAG 2.1 contrast ratio formula

https://claude.ai/code/session_016yUMp2eoEEdVpEPAE98hDA
Copilot AI review requested due to automatic review settings March 13, 2026 03:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an Accessibility command suite to the PowerShell module, covering color-blind-friendly terminal styling, screen-reader-friendly output, WCAG contrast analysis, and import/export of accessibility settings.

Changes:

  • Introduces color-blind profile management (set/get/reset palettes derived from Okabe–Ito).
  • Adds screen reader mode toggles and an ANSI-stripping plain text converter.
  • Adds WCAG 2.1 contrast ratio tooling plus JSON-based profile export/import.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
Accessibility/Public/Set-ColorBlindProfile.ps1 Applies an Okabe–Ito-derived palette to $PSStyle.Formatting and optionally persists to $PROFILE.
Accessibility/Public/Get-ColorBlindProfile.ps1 Returns the active color profile name and its palette data.
Accessibility/Public/Reset-ColorProfile.ps1 Resets $PSStyle.Formatting colors to PowerShell defaults and clears active profile state.
Accessibility/Public/Get-ColorBlindPalette.ps1 Returns palette data for a specified profile without applying it.
Accessibility/Private/Get-ColorBlindPaletteData.ps1 Provides the palette data store for each supported profile type.
Accessibility/Public/Enable-ScreenReaderMode.ps1 Enables screen-reader-friendly output by setting OutputRendering to PlainText.
Accessibility/Public/Disable-ScreenReaderMode.ps1 Disables screen reader mode and restores ANSI output rendering (currently hardcoded).
Accessibility/Public/ConvertTo-PlainText.ps1 Removes ANSI escape sequences from text for screen readers/logging.
Accessibility/Public/Get-AccessibilityProfile.ps1 Snapshots current module accessibility settings for inspection/export.
Accessibility/Public/Export-AccessibilityProfile.ps1 Serializes current accessibility settings to JSON.
Accessibility/Public/Import-AccessibilityProfile.ps1 Loads settings from JSON and applies color profile + screen reader mode.
Accessibility/Public/Test-ColorContrast.ps1 Computes WCAG contrast ratio and AA/AAA pass/fail flags.
Accessibility/Private/Get-RelativeLuminance.ps1 Implements WCAG relative luminance calculation.
Accessibility/Private/Get-ContrastRatio.ps1 Implements WCAG contrast ratio calculation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Added permissions for contents and issues in CI workflow.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 13, 2026

Test Results

  3 files   81 suites   3s ⏱️
 95 tests  93 ✅ 2 💤 0 ❌
285 runs  279 ✅ 6 💤 0 ❌

Results for commit 038d0c4.

♻️ This comment has been updated with latest results.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@HeyItsGilbert HeyItsGilbert merged commit 07d48da into main Mar 13, 2026
6 checks passed
@HeyItsGilbert HeyItsGilbert deleted the claude/terminal-color-accessibility-gC1q2 branch March 13, 2026 20:09
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.

3 participants