java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.operations.ColorOperations

public final class ColorOperations extends Object
A collection of common pointwise operations on colors.
  • Field Details

    • MASK

      public static final PointwiseOperation.Binary<Integer> MASK
      A pointwise operation that combines the alpha channel of the second color with the RGB channels of the first.
    • OVERLAY

      public static final PointwiseOperation.Any<Integer> 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

      public static final PointwiseOperation.Any<Integer> ADD
      A pointwise operation that adds all provided colors together, clamping the result to 255.
    • MULTIPLY

      public static final PointwiseOperation.Any<Integer> MULTIPLY
      A pointwise operation that multiplies all provided colors together, scaling to a 0-255 range.
    • INVERT

      public static final PointwiseOperation.Unary<Integer> INVERT
      A pointwise operation that inverts the color.