Skip to content

Document hue interpolation method default in color-mix() - #45110

Closed
fufu1209 wants to merge 1 commit into
mdn:mainfrom
fufu1209:color-mix-hue-default
Closed

Document hue interpolation method default in color-mix()#45110
fufu1209 wants to merge 1 commit into
mdn:mainfrom
fufu1209:color-mix-hue-default

Conversation

@fufu1209

Copy link
Copy Markdown

Summary

Fixes #44894 (content part).

The color-mix() page's syntax examples already show calls both with and without a hue interpolation method, but it was not explicitly demonstrated that omitting the method is valid and what it defaults to. This PR adds, in the Color interpolation method section, a note and a short example showing that omitting the hue interpolation method when mixing in a polar color space defaults to shorter hue, and that color-mix(in lch, red, blue) and color-mix(in lch shorter hue, red, blue) are equivalent.

The browser-compat-data part of the issue is tracked separately in mdn/browser-compat-data#28693.

Verification

Verified against the CSS Color 5 spec (csswg-drafts css-color-5/Overview.bs): <color-interpolation-method> is in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? ], and the hue interpolation method is not the default (''shorter'') only when explicitly written — i.e. the default is shorter.

@fufu1209
fufu1209 requested a review from a team as a code owner August 13, 2026 03:11
@fufu1209
fufu1209 requested review from estelle and removed request for a team August 13, 2026 03:11
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Aug 13, 2026
@Josh-Cena

Copy link
Copy Markdown
Member

Duplicate of #44904

@Josh-Cena Josh-Cena marked this as a duplicate of #44904 Aug 13, 2026
@Josh-Cena Josh-Cena closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

interpolation-method is optional in color-mix()

3 participants