AfterEffects

Posterize effect

The Posterize effect lets you specify the number of tonal levels (or brightness values) for each channel in an image. The Posterize effect then maps pixels to the closest matching level. For example, choosing two tonal levels in an RGB image gives you two tones for red, two tones for green, and two tones for blue. Values range from 2 to 255.

Level
The number of tonal levels for each channel.

This effect works with 8-bpc and 16-bpc color.

Original (left), and with effect applied (right)