if (config.getLabelPosition() != LabelPosition.OUTSIDE) {
labelBrightness = rgbSprite.getGrayScale() / 255.0;
} else {
labelBrightness = 1;
}
HSL hsl = new HSL(rgb);
hsl.setLightness(labelBrightness > 0.5 ? 0.2 : 0.8);
label.setFill(new RGB(hsl));
label.redraw();
}
}