Color.blendHardMix()

<static> blendHardMix(a, b) → {integer}

Runs blendVividLight on the source and backdrop colors.
If the resulting color is 128 or more, it receives a value of 255; if less than 128, a value of 0.
Therefore, all blended pixels have red, green, and blue channel values of either 0 or 255.
This changes all pixels to primary additive colors (red, green, or blue), white, or black.

Parameters
Name Type Description
a integer

The source color to blend, in the range 1 to 255.

b integer

The backdrop color to blend, in the range 1 to 255.

Returns
integer -

The blended color value, in the range 1 to 255.

Source code: utils/Color.js (Line 1302)
doc_phaser
2017-02-14 10:41:43
Comments
Leave a Comment

Please login to continue.