Class ColorOperations
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.operations.ColorOperations
A collection of common pointwise operations on colors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PointwiseOperation.Any<Integer> A pointwise operation that adds all provided colors together, clamping the result to 255.static final PointwiseOperation.Unary<Integer> A pointwise operation that inverts the color.static final PointwiseOperation.Binary<Integer> A pointwise operation that combines the alpha channel of the second color with the RGB channels of the first.static final PointwiseOperation.Any<Integer> A pointwise operation that multiplies all provided colors together, scaling to a 0-255 range.static final PointwiseOperation.Any<Integer> A pointwise operation that overlays all provided colors, using alpha compositing. -
Method Summary
-
Field Details
-
MASK
A pointwise operation that combines the alpha channel of the second color with the RGB channels of the first. -
OVERLAY
A pointwise operation that overlays all provided colors, using alpha compositing. The first provided color is the top layer, and the last provided color is the bottom layer. -
ADD
A pointwise operation that adds all provided colors together, clamping the result to 255. -
MULTIPLY
A pointwise operation that multiplies all provided colors together, scaling to a 0-255 range. -
INVERT
A pointwise operation that inverts the color.
-