Java examples for 2D Graphics:Color Dark
make Color Brighter
//package com.java2s; import java.awt.Color; public class Main { public static Color makeBrighter(Color curColor, int distance) { int red = curColor.getRed(); int green = curColor.getGreen(); int blue = curColor.getBlue(); red += distance;//from w ww .j a v a 2 s .c o m green += distance; blue += distance; if (red > 255) red = 255; if (green > 255) green = 255; if (blue > 255) blue = 255; return new Color(red, green, blue); } }