Get Brighter Version Of Current Color - Java 2D Graphics

Java examples for 2D Graphics:Color Light

Description

Get Brighter Version Of Current Color

Demo Code


import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
 
public class Main {
 
        public void paint(Graphics g){
                Color customColor = new Color(255,10,10);
               //from  w ww.ja va2 s .c  om
                Color brighterColor = customColor.brighter();
                //setForeground(brighterColor);
                g.drawString("Brighter Color", 80, 10);
               
        }
}

Related Tutorials