use of com.biglybt.ui.swt.mainwindow.HSLColor in project BiglyBT by BiglySoftware.
the class TableViewPainted method getColorLine.
private Color getColorLine() {
if (colorLine == null) {
colorLine = Colors.getSystemColor(cTable.getDisplay(), SWT.COLOR_LIST_BACKGROUND);
HSLColor hslColor = new HSLColor();
hslColor.initHSLbyRGB(colorLine.getRed(), colorLine.getGreen(), colorLine.getBlue());
int lum = hslColor.getLuminence();
if (lum > 127)
lum -= 25;
else
lum += 40;
hslColor.setLuminence(lum);
colorLine = new Color(cTable.getDisplay(), hslColor.getRed(), hslColor.getGreen(), hslColor.getBlue());
}
return colorLine;
}
use of com.biglybt.ui.swt.mainwindow.HSLColor in project BiglyBT by BiglySoftware.
the class Plot3D method initialize.
@Override
public void initialize(Canvas _canvas) {
canvas = _canvas;
Device device = canvas.getDisplay();
colours = new Color[16];
HSLColor hsl = new HSLColor();
hsl.initHSLbyRGB(130, 240, 240);
int step = 128 / colours.length;
int hue = colours.length * step;
for (int i = 0; i < colours.length; i++) {
hsl.setHue(hue);
hue -= step;
colours[i] = new Color(device, hsl.getRed(), hsl.getGreen(), hsl.getBlue());
}
}