Members
-
alpha :number
-
The value that determines how much of the original color is used when mixing the colors. A value between 0 (all original) and 1 (all final)
Type:
- number
- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 43)
Methods
-
blackWhite( [multiply])
-
Sets this ColorMatrix to be black and white.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 289)
Returns:
This ColorMatrix instance.
-
brightness( [value] [, multiply])
-
Changes the brightness of this ColorMatrix by the given amount.
Parameters:
Name Type Argument Default Description value
number <optional>
0 The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.
multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 168)
Returns:
This ColorMatrix instance.
-
brown( [multiply])
-
Applies a brown tone to this ColorMatrix.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 450)
Returns:
This ColorMatrix instance.
-
contrast( [value] [, multiply])
-
Change the contrast of this ColorMatrix by the amount given.
Parameters:
Name Type Argument Default Description value
number <optional>
0 The amount of contrast to apply to this ColorMatrix.
multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 311)
Returns:
This ColorMatrix instance.
-
desaturateLuminance( [multiply])
-
Apply a desaturated luminance to this ColorMatrix.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 360)
Returns:
This ColorMatrix instance.
-
getData()
-
Gets the ColorMatrix as a Float32Array.
Can be used directly as a 1fv shader uniform value.
- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 139)
Returns:
The ColorMatrix as a Float32Array.
- Type
- Float32Array
-
grayscale( [value] [, multiply])
-
Sets this ColorMatrix to be grayscale.
Parameters:
Name Type Argument Default Description value
number <optional>
1 The grayscale scale (0 is black).
multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 270)
Returns:
This ColorMatrix instance.
-
hue( [rotation] [, multiply])
-
Rotates the hues of this ColorMatrix by the value given.
Parameters:
Name Type Argument Default Description rotation
number <optional>
0 The amount of hue rotation to apply to this ColorMatrix, in degrees.
multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 238)
Returns:
This ColorMatrix instance.
-
kodachrome( [multiply])
-
Applies a kodachrome color effect to this ColorMatrix.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 494)
Returns:
This ColorMatrix instance.
-
lsd( [multiply])
-
Applies a trippy color tone to this ColorMatrix.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 428)
Returns:
This ColorMatrix instance.
-
multiply(a)
-
Multiplies the two given matrices.
Parameters:
Name Type Description a
Array.<number> The 5x4 array to multiply with ColorMatrix._matrix.
- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 582)
Returns:
This ColorMatrix instance.
-
negative( [multiply])
-
Converts this ColorMatrix to have negative values.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 338)
Returns:
This ColorMatrix instance.
-
night( [intensity] [, multiply])
-
Applies a night vision tone to this ColorMatrix.
Parameters:
Name Type Argument Default Description intensity
number <optional>
0.1 The intensity of this effect.
multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 404)
Returns:
This ColorMatrix instance.
-
polaroid( [multiply])
-
Applies a polaroid color effect to this ColorMatrix.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 538)
Returns:
This ColorMatrix instance.
-
reset()
-
Resets the ColorMatrix.
- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 95)
Returns:
This ColorMatrix instance.
-
saturate( [value] [, multiply])
-
Changes the saturation of this ColorMatrix by the given amount.
Parameters:
Name Type Argument Default Description value
number <optional>
0 The amount of saturation to apply to this ColorMatrix.
multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 194)
Returns:
This ColorMatrix instance.
-
saturation( [multiply])
-
Desaturates this ColorMatrix (removes color from it).
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 221)
Returns:
This ColorMatrix instance.
-
sepia( [multiply])
-
Applies a sepia tone to this ColorMatrix.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 382)
Returns:
This ColorMatrix instance.
-
set(value)
-
Sets this ColorMatrix from the given array of color values.
Parameters:
Name Type Description value
Array.<number> The ColorMatrix values to set.
- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 76)
Returns:
This ColorMatrix instance.
-
shiftToBGR( [multiply])
-
Shifts the values of this ColorMatrix into BGR order.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 560)
Returns:
This ColorMatrix instance.
-
technicolor( [multiply])
-
Applies a technicolor color effect to this ColorMatrix.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 516)
Returns:
This ColorMatrix instance.
-
vintagePinhole( [multiply])
-
Applies a vintage pinhole color effect to this ColorMatrix.
Parameters:
Name Type Argument Default Description multiply
boolean <optional>
false Multiply the resulting ColorMatrix (
true
), or set it (false
) ?- Since: 3.50.0
- Source: src/display/ColorMatrix.js (Line 472)
Returns:
This ColorMatrix instance.