Max Color Count
This rule checks that the image does not exceed the specified maximum number of colors.
Parameter table
param | unit | required | description |
---|---|---|---|
maxColorCount | Count | no | Maximum number of colors allowed in the image (maxColorCount ). |
Detailed description
This rule checks that the image does not exceed a specified maximum number of colors.The checking process involves iterating through the pixels of the image to count unique colors.The validation ensures that the count does not exceed the specified maximum color count.
Correction
The correction process involves color quantization using the K-means algorithm with K equal to the specified maximum color count. The image is transformed by reducing the number of distinct colors while preserving visual quality.
How to setup
This rule evaluates whether an image's color count conforms to the specified maximum limit. The only parameter is:
maxColorCount
: Maximum number of colors allowed in the image.
Creator tips
To reduce the number of colors with greater flexibility, consider the following resources:
- Explore tutorials on color reduction in Photoshop: YouTube Tutorial
- Refer to the GIMP documentation on converting images to indexed mode: GIMP Indexed Mode
Examples
value | valid | maxColorCount | description |
---|---|---|---|
✅ | 16 | The image should have a maximum of 16 colors. | |
❌ | 16 | The image should have a maximum of 16 colors. |