public Color withAlpha(int alpha) {
    if (alpha == 0) {
      return TRANSPARENT;
    }

    assert 0 <= alpha && alpha <= 255 : "Alpha " + alpha + "is incorrect. Alpha should be in range 0..255";
    return new Gray(getRed(), alpha);
  }
public Color withAlpha(int alpha)