Color (@NotNull Color color, @NotNull Color backgroundColor, double transparency) { int r = makeTransparent(transparency, color.getRed(), backgroundColor.getRed()); int g = makeTransparent(transparency, color.getGreen(), backgroundColor.getGreen()); int b = makeTransparent(transparency, color.getBlue(), backgroundColor.getBlue()); //noinspection UseJBColor return new Color(r, g, b); }