Blog Post

Return to blog feed

Unity UI Gradient Shader

February 14th, 2019 (edited November 3rd, 2022)

EDIT: An updated version of this shader that supports Sliced images is available here.

I created a variant of Unity's default UI shader; instead of using a solid tint color across the entire element, it uses a four-color gradient. The source is MIT-licensed and available on GitHub.

Unity UI Gradient shader example image