mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 05:44:52 +00:00
doc: Attempt to clarify how the factor of color's mix() function is applied
This commit is contained in:
parent
8e3728864e
commit
a61ca93cd1
4 changed files with 14 additions and 9 deletions
|
@ -95,8 +95,10 @@ All colors and brushes define the following methods:
|
|||
|
||||
- **`mix(other: brush, factor: float) -> brush`**
|
||||
|
||||
Returns a new color that is a mix of this color and `other`, with a proportion
|
||||
factor given by factor (which will be clamped to be between `0.0` and `1.0`).
|
||||
Returns a new color that is a mix of this color and `other`. The specified factor is
|
||||
clamped to be between `0.0` and `1.0` and then applied to this color, while `1.0 - factor`
|
||||
is applied to `other`. For example `red.mix(green, 70%)` will have a stronger tone of red, while
|
||||
`red.mix(green, 30%)` will have a stronger tone of green.
|
||||
|
||||
- **`transparentize(factor: float) -> brush`**
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue