Class SwColor

java.lang.Object
pkg.exoad.swiggie.SwColor
All Implemented Interfaces:
SwArithmetic<SwColor>

public class SwColor extends Object implements SwArithmetic<SwColor>
  • Field Details

  • Constructor Details

    • SwColor

      private SwColor()
    • SwColor

      private SwColor(int r, int g, int b, int a)
    • SwColor

      private SwColor(int argb)
  • Method Details

    • acquireRGBACompliant

      public static SwClampedValue<Integer> acquireRGBACompliant(int value)
    • acquireFromRGB

      public static SwColor acquireFromRGB(int r, int g, int b)
    • acquireFromRGB

      public static SwColor acquireFromRGB(int rgb)
    • acquireFromHEX

      public static SwColor acquireFromHEX(String hex)
    • acquireFromARGB

      public static SwColor acquireFromARGB(int argb)
    • acquireFromRGBA

      public static SwColor acquireFromRGBA(int r, int g, int b, int a)
    • getRGBA

      public int getRGBA()
    • getRGB

      public int getRGB()
    • getRed

      public int getRed()
    • getGreen

      public int getGreen()
    • getBlue

      public int getBlue()
    • getAlpha

      public int getAlpha()
    • setRed

      public void setRed(int red)
    • setGreen

      public void setGreen(int green)
    • setBlue

      public void setBlue(int blue)
    • setAlpha

      public void setAlpha(int alpha)
    • normalizeGreen

      public float normalizeGreen()
    • normalizeRed

      public float normalizeRed()
    • normalizeBlue

      public float normalizeBlue()
    • normalizeAlpha

      public float normalizeAlpha()
    • asFloatArray

      public float[] asFloatArray()
    • add

      public SwColor add(SwColor other)
      Specified by:
      add in interface SwArithmetic<SwColor>
    • subtract

      public SwColor subtract(SwColor other)
      Specified by:
      subtract in interface SwArithmetic<SwColor>
    • multiply

      public SwColor multiply(SwColor other)
      Specified by:
      multiply in interface SwArithmetic<SwColor>
    • divide

      public SwColor divide(SwColor other)
      Specified by:
      divide in interface SwArithmetic<SwColor>