void (@NotNull Collection<Color> colors, int minIntensity, int maxIntensity) { for (Color color : colors) { int intensity = (color.getRed() + color.getGreen() + color.getBlue()) / 3; assertTrue(color + " doesn't fit to intensity range [" + minIntensity + ".." + maxIntensity + "]", intensity >= minIntensity && intensity <= maxIntensity); } }