Here you can find the source of changeAlpha(Color c, double alpha)
public static Color changeAlpha(Color c, double alpha)
//package com.java2s; /*************************************** * ViPER * * The Video Processing * * Evaluation Resource * * * * Distributed under the GPL license * * Terms available at gnu.org. * * * * Copyright University of Maryland, * * College Park. * ***************************************/ import java.awt.*; public class Main { public static Color changeAlpha(Color c, double alpha) { return new Color(c.getRed(), c.getGreen(), c.getBlue(), (int) (alpha * 255)); }//from ww w .j a v a2 s .c om }