}
protected Icon createSampler (int baseColor) {
int size = 16;
CanvasImage cimg = graphics().createImage(size * 17, size);
Canvas canvas = cimg.canvas();
int lighter = baseColor;
for (int ii = 0; ii <= 8; ++ii) {
canvas.setFillColor(lighter);
canvas.fillRect(size * (ii + 8), 0, size, size);
lighter = Colors.brighter(lighter);
}
int darker = baseColor;
for (int ii = 0; ii < 8; ++ii) {
canvas.setFillColor(darker);
canvas.fillRect(size * (7 - ii), 0, size, size);
darker = Colors.darker(darker);
}
canvas.setStrokeColor(Colors.BLACK);
canvas.strokeRect(size * 8, 0, size - 1, size - 1);
return Icons.image(cimg);
}