Visit ComfyUI Online for ready-to-use ComfyUI environment
Simplify image color palette by reducing distinct colors for a cleaner, more polished look.
The Flatten Colors node is designed to simplify the color palette of an image by reducing the number of distinct colors it contains. This process, known as color quantization, is particularly useful for creating a more uniform and stylized look in your images, which can be beneficial for various artistic and design purposes. By limiting the number of colors, you can achieve a more cohesive visual effect, making the image appear cleaner and more polished. This node is especially useful for creating images with a specific aesthetic or for reducing the complexity of images for further processing.
This parameter accepts a list of images that you want to process. Each image should be in the format of a tensor, which is a multi-dimensional array used to store the pixel data. The images are the primary input for the node, and they will undergo the color flattening process to reduce the number of distinct colors.
This optional parameter allows you to specify the number of colors you want the output image to contain. The default value is 5, but you can set it to any integer between 1 and 4000. Lower values will result in a more pronounced flattening effect, with fewer colors and a more stylized appearance, while higher values will retain more of the original color detail. Adjusting this parameter helps you control the extent of color reduction to achieve the desired visual effect.
The output of this node is a tensor representing the processed image(s) with the flattened color palette. The resulting image will have a reduced number of distinct colors, as specified by the number_of_colors
parameter. This output can be used for further processing or directly in your artistic projects to achieve a more uniform and stylized look.
number_of_colors
parameter to find the optimal balance between color reduction and image detail for your specific project.number_of_colors
parameter is set to a value outside the allowed range (1 to 4000).number_of_colors
parameter to be within the valid range. The default value is 5, and you can set it to any integer between 1 and 4000.© Copyright 2024 RunComfy. All Rights Reserved.