public class ColorRoutines
extends java.lang.Object
构造器和说明 |
---|
ColorRoutines(java.awt.Color c) |
ColorRoutines(int hue,
int sat,
int bri,
boolean preserveGrey) |
限定符和类型 | 方法和说明 |
---|---|
static int |
calculateHue(java.awt.Color c)
转换颜色
|
int |
colorize(int r,
int g,
int b,
int a)
将颜色值转换成int值
|
protected static int |
colorToInt(java.awt.Color c,
int a) |
protected static int |
colorToInt(int r,
int g,
int b,
int a) |
static java.awt.Color |
darken(java.awt.Color c,
int amount)
计算亮度,家中
|
static java.awt.Color |
darken(int grey,
int amount)
颜色
|
static java.awt.Color |
getAlphaColor(java.awt.Color c,
int a) |
static java.awt.Color |
getAverage(java.awt.Color c1,
java.awt.Color c2) |
static int |
getBrightness(java.awt.Color c) |
static int |
getBrightness(int r,
int g,
int b) |
static java.awt.Color |
getGradient(java.awt.Color c1,
java.awt.Color c2,
int d,
int i) |
static float |
getGreyValue(java.awt.Color c) |
static java.awt.Color |
getHSB(int h,
int s,
int b) |
static int |
getHue(java.awt.Color c) |
static int |
getHue(int r,
int g,
int b) |
static java.awt.Color |
getInverseColor(java.awt.Color c) |
static java.awt.Color |
getMaxSaturation(java.awt.Color c,
int memH) |
static java.awt.Color |
getRandomColor() |
static int |
getSaturation(java.awt.Color c) |
static int |
getSaturation(int r,
int g,
int b) |
static java.awt.Color |
lighten(java.awt.Color c,
int amount)
计算亮度,减轻
|
static java.awt.Color |
lighten(int grey,
int amount)
颜色
|
public ColorRoutines(java.awt.Color c)
public ColorRoutines(int hue, int sat, int bri, boolean preserveGrey)
public static java.awt.Color getAverage(java.awt.Color c1, java.awt.Color c2)
public static java.awt.Color getGradient(java.awt.Color c1, java.awt.Color c2, int d, int i)
public static java.awt.Color getMaxSaturation(java.awt.Color c, int memH)
public static float getGreyValue(java.awt.Color c)
public static int getBrightness(java.awt.Color c)
public static int getBrightness(int r, int g, int b)
public static int getSaturation(java.awt.Color c)
public static int getSaturation(int r, int g, int b)
public static int getHue(java.awt.Color c)
public static int calculateHue(java.awt.Color c)
c
- RGB颜色值public static int getHue(int r, int g, int b)
public static java.awt.Color getHSB(int h, int s, int b)
public int colorize(int r, int g, int b, int a)
r
- 红色值g
- 绿色值b
- 蓝色值a
- 透明度public static java.awt.Color getInverseColor(java.awt.Color c)
public static java.awt.Color getRandomColor()
public static java.awt.Color getAlphaColor(java.awt.Color c, int a)
protected static int colorToInt(java.awt.Color c, int a)
protected static int colorToInt(int r, int g, int b, int a)
public static java.awt.Color lighten(java.awt.Color c, int amount)
c
- 颜色值amount
- 亮度值public static java.awt.Color darken(java.awt.Color c, int amount)
c
- 颜色值amount
- 加重值public static java.awt.Color lighten(int grey, int amount)
grey
- 灰度amount
- 量public static java.awt.Color darken(int grey, int amount)
grey
- 灰度amount
- 量