Color/Quantize

 

 

To Quantize means to limit the number of possible values (i.e. colors) to a certain amount of levels. This function is especially useful when working on a heightmap, which has to represent steps or multiple, isolated levels.

The program works with 8 bit per color channel, which allows values between 0 and 255. These colors are rounded down to levels, that are defined by the distance to each other. This distance is controlled with the Divisor value. For example if you set it to 64, the colors are divided by 64, limiting them to 4 different levels (256/64=4).

Add a constant value to the color channels before they are quantized.