public class ColorUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
STRIPES_YELLOW |
Constructor and Description |
---|
ColorUtils() |
Modifier and Type | Method and Description |
---|---|
static java.awt.Paint |
createStripesPaint(java.awt.Color primeColor)
To create a stripe paint with the color primeColor and black.
|
static java.awt.Paint |
createStripesPaint(java.awt.Color primeColor,
java.awt.Color secondColor) |
static java.awt.Paint |
createStripesPaint(java.awt.Dimension dim,
java.awt.Color primeColor)
To create a stripe paint with the color primeColor and black.
|
static java.awt.Paint |
createStripesPaintDisabled(java.awt.Color primeColor)
To create a stripe paint with the color primeColor and black, as disabled (grey colors).
|
static java.awt.Paint |
createStripesPaintDisabled(java.awt.Color primeColor,
java.awt.Color secondColor) |
static java.awt.Paint |
createStripesPaintDisabled(java.awt.Dimension dim,
java.awt.Color primeColor)
To create a stripe paint with the color primeColor and black, as disabled (grey colors).
|
static java.awt.Color[] |
generateVisuallyDistinctColors(int ncolors,
float minComponent,
float maxComponent)
Returns an array of ncolors RGB triplets such that each is as unique from the rest as possible and each color has
at least one component greater than minComponent and one less than maxComponent.
|
static java.lang.String |
getHtmlColor(java.awt.Color c) |
static void |
hsv2rgb(float h,
float s,
float v,
float[] rgb) |
static java.awt.Color |
invertColor(java.awt.Color c) |
static java.awt.Color |
invertColor(java.awt.Color c,
int transparency) |
static void |
main(java.lang.String[] args) |
static void |
rgb2yuv(float r,
float g,
float b,
float[] yuv) |
static java.awt.Color |
setTransparencyToColor(java.awt.Color c,
int transparency) |
static void |
yuv2rgb(float y,
float u,
float v,
float[] rgb) |
public static final java.awt.Color setTransparencyToColor(java.awt.Color c, int transparency)
public static final java.awt.Color invertColor(java.awt.Color c)
public static final java.awt.Color invertColor(java.awt.Color c, int transparency)
public static java.awt.Color[] generateVisuallyDistinctColors(int ncolors, float minComponent, float maxComponent)
public static void hsv2rgb(float h, float s, float v, float[] rgb)
public static void yuv2rgb(float y, float u, float v, float[] rgb)
public static void rgb2yuv(float r, float g, float b, float[] yuv)
public static java.awt.Paint createStripesPaint(java.awt.Color primeColor)
primeColor
- The color of the one stripe, the other is black.public static java.awt.Paint createStripesPaint(java.awt.Color primeColor, java.awt.Color secondColor)
public static java.awt.Paint createStripesPaint(java.awt.Dimension dim, java.awt.Color primeColor)
dim
- The size of the image to create the pattern.primeColor
- The color of the one stripe, the other is black.public static java.awt.Paint createStripesPaintDisabled(java.awt.Color primeColor)
primeColor
- The color of the one stripe, the other is black.public static java.awt.Paint createStripesPaintDisabled(java.awt.Color primeColor, java.awt.Color secondColor)
public static java.awt.Paint createStripesPaintDisabled(java.awt.Dimension dim, java.awt.Color primeColor)
dim
- The size of the image to create the pattern.primeColor
- The color of the one stripe, the other is black.public static void main(java.lang.String[] args)
public static java.lang.String getHtmlColor(java.awt.Color c)
Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.