void (@NotNull Graphics2D graphics, @NotNull Point offset, @NotNull Color currentColor) { graphics.setColor(Gray._0.withAlpha(150)); int x = SIZE / 4 + offset.x; int y = SIZE * 3 / 4 + offset.y; int width = SIZE / 2; int height = SIZE / 8; graphics.fillRoundRect(x, y, width, height, 10, 10); graphics.setColor(Gray._255); String colorString = currentColor.getRed() + " " + currentColor.getGreen() + " " + currentColor.getBlue(); FontMetrics metrics = graphics.getFontMetrics(); int stringWidth = metrics.stringWidth(colorString); int stringHeight = metrics.getHeight(); graphics.drawString(colorString, x + (width - stringWidth) / 2, y + stringHeight); }