public class Colors extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
adjustColor(String hex,
int range)
调整颜色
|
static boolean |
isDarkColor(int r,
int g,
int b)
是否为深色
亮度值 < 128 ?
|
static boolean |
isDarkColor(String hex)
是否为深色
亮度值 < 128 ?
|
static Color |
toColor(byte[] bs)
RGB > Color
|
static Color |
toColor(int[] bs)
RGB > Color
|
static Color |
toColor(int r,
int g,
int b)
RGB > Color
|
static Color |
toColor(String hex)
HEX > Color
|
static String |
toHex(Color color)
Color > HEX
|
static byte[] |
toRgb(String hex)
HEX > RGB
|
static int[] |
toRgbColor(String hex)
HEX > RGB
|
public static int[] toRgbColor(String hex)
hex - Hexpublic static byte[] toRgb(String hex)
hex - Hexpublic static Color toColor(byte[] bs)
bs - RGBpublic static Color toColor(int[] bs)
bs - RGBpublic static Color toColor(int r, int g, int b)
r - Rg - Gb - Bpublic static boolean isDarkColor(String hex)
hex - hexpublic static boolean isDarkColor(int r,
int g,
int b)
r - rg - gb - bCopyright © 2025. All rights reserved.