Skip to content

Commit

Permalink
Fixed color-mix description
Browse files Browse the repository at this point in the history
Clarified what happens when the specified percentages add up to less than 100%.
  • Loading branch information
TPReal authored Sep 28, 2024
1 parent d2487ed commit 078c154
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions files/en-us/web/css/color_value/color-mix/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Functional notation: `color-mix(<color-interpolation-method>, <color>[<percentag
- If `p2` is omitted, then `p2 = 100% - p1`.
- If `p1 = p2 = 0%`, the function is invalid.
- If `p1 + p2 ≠ 100%`, then `p1' = p1 / (p1 + p2)` and `p2' = p2 / (p1 + p2)`, where `p1'` and `p2'` are the normalization results.
- If `p1 + p2 < 100%`, then an alpha multiplier of `p1 + p2` is applied to the resulting color. This is similar to mixing in [`transparent`](/en-US/docs/Web/CSS/named-color#transparent), with percentage `pt = 100% - p1 - p2`.

### Formal syntax

Expand Down

0 comments on commit 078c154

Please sign in to comment.