Add Posterize effect to your Sprite Renderer and Unity UI Canvas Image.

Add it to the Sprite Renderer or Unity UI Canvas Image GameObject via the Components menu2DxFX > Standard > Posterize

4 Gradients is available in Advanced Lightning Mode. Via the Components menu2DxFX > Advanced Lightning > Posterize

Note : Advanced Lightning is not working with the Unity UI Canvas (UI Canvas don't use lightning)

*without and with 2DxFX Posterize




_Alpha 0 to 1 1f
Posterize 1 to 256 120.0f

Manipulate Posterize by script


// Drag and Drop your Sprite GameObject 
// with the Posterize component 
// to your current script on the FX_Standard_Posterize field 

public _2dxFX_Posterize_Editor FX_Posterize; 

void Update() 
	FX_Posterize._Alpha =  1f;