Skip to content

fix: p3 color parsing#476

Merged
Brentlok merged 1 commit intomainfrom
fix/parsing-p3-colors
Mar 26, 2026
Merged

fix: p3 color parsing#476
Brentlok merged 1 commit intomainfrom
fix/parsing-p3-colors

Conversation

@Brentlok
Copy link
Contributor

@Brentlok Brentlok commented Mar 26, 2026

Summary by CodeRabbit

  • New Features
    • Added support for Display P3 color space utilities.
  • Tests
    • Extended test coverage for color format parsing to include Display P3 colors.

@coderabbitai
Copy link

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 212c87ce-a1ea-41fb-b634-be85585e2380

📥 Commits

Reviewing files that changed from the base of the PR and between 9fca689 and 239606c.

📒 Files selected for processing (3)
  • packages/uniwind/src/metro/processor/color.ts
  • packages/uniwind/tests/native/styles-parsing/colors.test.tsx
  • packages/uniwind/tests/test.css

📝 Walkthrough

Walkthrough

Added Display P3 color format support by normalizing 'display-p3' mode to 'p3' in the color processor, along with corresponding test fixture and CSS theme property to validate the new color format handling.

Changes

Cohort / File(s) Summary
Color Processing Logic
packages/uniwind/src/metro/processor/color.ts
Updated Color.processColor to normalize 'display-p3' mode to 'p3' when passing to culori for proper color conversion.
Test Fixtures and Theme Configuration
packages/uniwind/tests/native/styles-parsing/colors.test.tsx, packages/uniwind/tests/test.css
Added test fixture for bg-p3 class with #ffd400 assertion and defined --color-p3 CSS custom property using color(display-p3 1 0.84 0.04) in the theme block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A P3 color hops into view,
From display-p3 mapped to p3 so true,
With #ffd400 shining bright,
The palette's now more complete and right! 🎨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: p3 color parsing' directly describes the main change: fixing p3 color parsing by normalizing display-p3 mode conversion in the color processor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/parsing-p3-colors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Brentlok Brentlok merged commit 54b4852 into main Mar 26, 2026
2 checks passed
@Brentlok Brentlok deleted the fix/parsing-p3-colors branch March 26, 2026 07:12
@github-actions
Copy link
Contributor

🚀 This pull request is included in v1.6.1. See Release v1.6.1 for release notes.

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