feat: add color blind accessibility command suite#6
Merged
HeyItsGilbert merged 3 commits intomainfrom Mar 13, 2026
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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.
Test Results 3 files 81 suites 3s ⏱️ 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
Deuteranopia, Protanopia, Tritanopia, Achromatopsia, and AccessibleDefault;
supports -Persist flag to write to $PROFILE for session persistence
Tier 2 - Text & reading:
OutputRendering to PlainText for screen reader compatibility
Tier 3 - Contrast analysis tools:
colors and reports AA/AAA compliance (uses private WCAG math helpers)
Tier 4 - Profile management:
serialization for sharing and restoring configurations
Private helpers added:
https://claude.ai/code/session_016yUMp2eoEEdVpEPAE98hDA