private void allocateColorWarning() {
if (display == null || display.isDisposed())
return;
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
Color colorTables = Colors.getSystemColor(display, SWT.COLOR_LIST_BACKGROUND);
HSLColor hslBG = new HSLColor();
hslBG.initHSLbyRGB(colorTables.getRed(), colorTables.getGreen(),
colorTables.getBlue());
int lum = hslBG.getLuminence();
HSLColor hslColor = new HSLColor();
hslColor.initRGBbyHSL(25, 200, 128 + (lum < 160 ? 10 : -10));
colorWarning = new AllocateColor("warning", new RGB(hslColor.getRed(),
hslColor.getGreen(), hslColor.getBlue()), colorWarning).getColor();
}
}, false);
}
Colors.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:BiglyBT
作者:
评论列表
文章目录