All Downloads are FREE. Search and download functionalities are using the official Maven repository.

devutility.internal.awt.ColorUtils Maven / Gradle / Ivy

There is a newer version: 1.3.8.1
Show newest version
package devutility.internal.awt;

import java.awt.Color;
import java.util.Random;

public class ColorUtils {
	private static final Random RANDOM = new Random();

	public static Color getRandomColor() {
		return new Color(RANDOM.nextInt(255), RANDOM.nextInt(255), RANDOM.nextInt(255));
	}

	public static Color getReverseColor(Color color) {
		return new Color(255 - color.getRed(), 255 - color.getGreen(), 255 - color.getBlue());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy