make Transparent Color - Java 2D Graphics

Java examples for 2D Graphics:Color

Description

make Transparent Color

Demo Code


//package com.java2s;
import java.awt.Color;

public class Main {
    public static final Color makeTransparentColor(Color color,
            float transparency) {
        return new Color(color.getRed() / 255.0f,
                color.getGreen() / 255.0f, color.getBlue() / 255.0f,
                transparency);/* w  ww  .j  ava 2  s  . c  o m*/
    }
}

Related Tutorials