@Override
	public void paintComponent(Graphics g) {
		g.setColor(getBackground());
		g.fillRect(0, 0, getWidth(), getHeight());
		for (int row = 0; row < numSwatches.height; row++) {
			for (int column = 0; column < numSwatches.width; column++) {
				g.setColor(getColorForCell(column, row));
				int x;
				if ((!this.getComponentOrientation().isLeftToRight()) &&
					(this instanceof RecentSwatchPanel)) {
					x = (numSwatches.width - column - 1) * (swatchSize.width + gap.width);
				}
				else {
					x = column * (swatchSize.width + gap.width);
				}
				int y = row * (swatchSize.height + gap.height);
				g.fillRect(x, y, swatchSize.width, swatchSize.height);
				g.setColor(Colors.BORDER);
				g.drawLine(x + swatchSize.width - 1, y, x + swatchSize.width - 1,
					y + swatchSize.height - 1);
				g.drawLine(x, y + swatchSize.height - 1, x + swatchSize.width - 1,
					y + swatchSize.height - 1);
			}
		}
	}
The background color, foreground color, and font are already set to the
defaults from the defaults table before this method is called.
Ghidra/Framework/Docking/src/main/java/docking/options/editor/SettableColorSwatchChooserPanel.java