Java Color Alpha changeColorAlpha(@Nonnull Color color, int newAlpha)

Here you can find the source of changeColorAlpha(@Nonnull Color color, int newAlpha)

Description

change Color Alpha

License

LGPL

Declaration

public static Color changeColorAlpha(@Nonnull Color color, int newAlpha) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import javax.annotation.Nonnull;
import java.awt.*;

public class Main {
    public static Color changeColorAlpha(@Nonnull Color color, int newAlpha) {
        return new Color(color.getRed(), color.getGreen(), color.getBlue(), newAlpha);
    }/*from www  .  ja v  a 2 s  .co m*/
}

Related

  1. applyColorFilter(Image image, Color color, float alpha)
  2. buildColorRamp(Color startColor, Color endColor, int numColors, int alpha)
  3. changeAlpha(Color c, double alpha)
  4. changeAlpha(Color c, double newAlpha)
  5. changeAlpha(Color c, int alpha)
  6. deriveWithAlpha(Color color, int alpha)
  7. newColourWithAlpha(Color color, double alpha)
  8. noAlpha(final Color col)
  9. overwriteAlpha(Color c, float alpha)