-
-
Notifications
You must be signed in to change notification settings - Fork 19
merge_color
Vašek edited this page Feb 10, 2019
·
2 revisions
Returns merged color from the two given colors
merge_color(col1, col2, amount)| Argument | Description |
|---|---|
Color col1 |
The first color |
Color col2 |
The other color |
double amount |
Color merge ratio (from 0 to 1) |
Returns: Color
This function merges two given colors into one. Set amount to 0.5 for the 1:1 ratio. If you set amount to 0, this function returns col1 and if you set amount to 1, this function returns col2.
Color col = merge_color(Color.Red, Color.Blue, 0.5);This function will set col to 127 0 127 255, which is a violet.
Back to Color And Alpha