Skip to content

feat(OnColor): add Readable Text Color BoxSource - #431

Open
XiaoXiaoSN wants to merge 1 commit into
mainfrom
feat/boxsource-new-oncolor
Open

feat(OnColor): add Readable Text Color BoxSource#431
XiaoXiaoSN wants to merge 1 commit into
mainfrom
feat/boxsource-new-oncolor

Conversation

@XiaoXiaoSN

@XiaoXiaoSN XiaoXiaoSN commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Box Source: Readable Text Color (Analyze)

Adds the Readable Text Color box source to Magic Box. It is disabled by default.

Details:

  • Category (Kind): Analyze
  • Tag: #
  • Default Input: #3498db ::oncolor

Options:

  • ::oncolor, ::textcolor

Description:

Given a background hex color, pick the readable foreground (black or white) and the WCAG contrast.

Usage Examples:

  • Input:
#3498db
::oncolor
  • Output Box (Readable Text Color):
Background: #3498db
Foreground: #000000
Contrast: 6.66:1
WCAG AA: pass
WCAG AAA: fail

@XiaoXiaoSN

Copy link
Copy Markdown
Owner Author

This PR is ready to merge!

@XiaoXiaoSN
XiaoXiaoSN force-pushed the feat/boxsource-new-oncolor branch from d603a74 to 3ce5456 Compare June 26, 2026 08:17
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