ScriptingΒΆ

Using Colorful effects in scripts is as easy as using any other custom scripts. Simply get the component and play with the values :

var vintage = GetComponent<Vintage>();
vintage.Filter = Vintage.InstragramFilter.Valencia;
vintage.Amount = 0.5f;

To avoid collisions with other Unity assets everything is contained in the Colorful namespace, so at the beginning of your script you’ll need to add :

using Colorful;

If you want to create an effect at runtime via scripting, make sure the shader is bundled in the build or the effect will disable itself ! To do that, simply add the shaders you need to the Always Included Shaders list in the Graphics Settings panel.

The codebase uses standard C# conventions and properly named properties.

Special care has been taken to make sure Colorful components can be extended (no private code, virtual methods etc). If you want to add your own effect you can extend the Colorful.BaseEffect class, most of the boilerplate code has been written already.

If for some reason you need to access editor classes, they’re in the Colorful.Editors namespace.