static L pixelColorsWithNonZeroSaturation(BufferedImage img) { if (img == null) null; int w = img.getWidth(), h = img.getHeight(); new L out; int rgb; for y to h: for x to w: if (saturationFromRGB(rgb = img.getRGB(x, y)) != 0) out.add(rgb); ret out; }