JXtension - Color.combine(color2, strength)

Purpose:
Gives the user the ability to mix two colors together.

Parameters:

color2 The other color object that you would like to mix with this color.
[ strength ] The percentage of color2 that will be mixed with this color.  This value must be greater than or equal to 0 but less than or equal to 100.  If the strength is not supplied, it will default to 50.

Returns:
Returns a new color, a specified percentage closer to white.

Example #1:
The following code will create a random color in the left cell below the code.  After that, it will create a lighter version of that color in the cell to the right of it:

 

Example #2:
The following will create two random colors and will display the result of mixing them in intervals of 25% strength:

 

See also: