Skip to content

fix(color): add rebeccapurple, the CSS Color Level 4 named color - #447

Merged
yezz123 merged 1 commit into
pydantic:mainfrom
RavSinghChandan:color-rebeccapurple
Oct 14, 2026
Merged

yezz123 merged 1 commit into
pydantic:mainfrom
RavSinghChandan:color-rebeccapurple

Conversation

@RavSinghChandan

Copy link
Copy Markdown
Contributor

Color("rebeccapurple") was rejected with "string not recognised as a valid color", although rebeccapurple (#663399) is a CSS named color since CSS Color Level 4 and every current browser supports it. It is now in COLORS_BY_NAME, so it parses, and Color("#663399").as_named() returns "rebeccapurple". Added cases to test_color_success and test_as_named.

@yezz123
yezz123 merged commit 67ef322 into pydantic:main Oct 14, 2026
12 checks passed
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.

2 participants