Enum BlendMode
- All Implemented Interfaces:
Comparable<BlendMode>
How a layer's colors combine with what is already painted below it.
The first sixteen are the modes of the W3C Compositing and Blending specification, which
PSD, Sketch, Figma and SVG's mix-blend-mode all share. The rest are Photoshop's
additional modes and the additive modes of CSS, Sketch and Figma.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe layer's hue and saturation, with the luminosity below.Darkens what is below to reflect the layer.Brightens what is below to reflect the layer.Keeps the darker of the two colors.Keeps whichever whole color, the layer's or the one below, has the lower luminosity.The absolute difference of the two colors.Shows each pixel of the layer fully or not at all, at random, in proportion to its opacity.Divides what is below by the layer.Like difference, with lower contrast.Multiply or screen, depending on the layer's color.Each channel goes to 0 or 1: the threshold of vivid light.The layer's hue, with the saturation and luminosity below.Keeps the lighter of the two colors.Keeps whichever whole color has the higher luminosity.Adds the two colors and subtracts white: darker than multiply.Adds the two colors: brighter than screen (Photoshop's "add").Linear burn or linear dodge, depending on the layer's color.The layer's luminosity, with the hue and saturation below.Multiplies the two colors, so the result is always darker.The layer covers what is below it.Multiply or screen, depending on the color below.Darken or lighten, depending on the layer's color.Subtracts the inverses of the colors from white, adding opacities: Sketch'splus-darker.Adds colors and opacities, clamped: theplus-lighterof CSS, Sketch and Figma.The layer's saturation, with the hue and luminosity below.Inverts, multiplies and inverts again, so the result is always lighter.A softer form of hard light.Subtracts the layer from what is below.Color burn or color dodge, depending on the layer's color. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true when this mode looks at all three color channels together, rather than blending each channel by itself.static BlendModeReturns the enum constant of this type with the specified name.static BlendMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
NORMAL
The layer covers what is below it. -
MULTIPLY
Multiplies the two colors, so the result is always darker. -
SCREEN
Inverts, multiplies and inverts again, so the result is always lighter. -
OVERLAY
Multiply or screen, depending on the color below. -
DARKEN
Keeps the darker of the two colors. -
LIGHTEN
Keeps the lighter of the two colors. -
COLOR_DODGE
Brightens what is below to reflect the layer. -
COLOR_BURN
Darkens what is below to reflect the layer. -
HARD_LIGHT
Multiply or screen, depending on the layer's color. -
SOFT_LIGHT
A softer form of hard light. -
DIFFERENCE
The absolute difference of the two colors. -
EXCLUSION
Like difference, with lower contrast. -
HUE
The layer's hue, with the saturation and luminosity below. -
SATURATION
The layer's saturation, with the hue and luminosity below. -
COLOR
The layer's hue and saturation, with the luminosity below. -
LUMINOSITY
The layer's luminosity, with the hue and saturation below. -
LINEAR_BURN
Adds the two colors and subtracts white: darker than multiply. -
LINEAR_DODGE
Adds the two colors: brighter than screen (Photoshop's "add"). -
VIVID_LIGHT
Color burn or color dodge, depending on the layer's color. -
LINEAR_LIGHT
Linear burn or linear dodge, depending on the layer's color. -
PIN_LIGHT
Darken or lighten, depending on the layer's color. -
HARD_MIX
Each channel goes to 0 or 1: the threshold of vivid light. -
SUBTRACT
Subtracts the layer from what is below. -
DIVIDE
Divides what is below by the layer. -
DARKER_COLOR
Keeps whichever whole color, the layer's or the one below, has the lower luminosity. -
LIGHTER_COLOR
Keeps whichever whole color has the higher luminosity. -
DISSOLVE
Shows each pixel of the layer fully or not at all, at random, in proportion to its opacity. -
PLUS_LIGHTER
Adds colors and opacities, clamped: theplus-lighterof CSS, Sketch and Figma. -
PLUS_DARKER
Subtracts the inverses of the colors from white, adding opacities: Sketch'splus-darker.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isNonSeparable
public boolean isNonSeparable()Returns true when this mode looks at all three color channels together, rather than blending each channel by itself.
-