BuilderOption Colour Reduction - Moon70/APNG-builder GitHub Wiki
When setting the maximum number of colours, a colour quantizer reduces the number of colours of all images to that value.
This is a lossy transformation.
Examples:
ApngBuilder builder = new ApngBuilder();
builder.setMaximumNumberOfColours(255);
new ApngBuilder().setMaximumNumberOfColours(255).buildPng(some-filearray, 500).savePng(new File("the-APNG-filepath"));
When setting to 255, the encoder will also change the image format from truecolour to a 256 colour palette image.