Color Palette Generation
This tutorial is about procedurally generating color palettes.
In it, I will explain how you can write code that generates palettes that are versatile and pleasant to look at.
Being able to generate nice palettes is useful for all kinds of things, like style tests, finding inspiration, or to create a huge amount of varying content. This tutorial is somewhat catered to the last of those three, as it is what I focused on in my own project, but will certainly be useful for people looking to quickly generate some style tests or inspiration too.
This tutorial is mostly catered to C# in Unity, but the principles of color generation will be mostly useable in other programs and languages as well. You can download the Unity project on the resources page.
The tutorial is meant for people who have some programming experience and want to know how to generate different types of good-looking color palettes. You can read about various subjects on these pages, or start out by downloading the Unitypackage and experimenting with the code in there.
This tutorial is divided into six parts:
Part 1: Different color models explains the differences between some useful color models, and their pros and cons in relation to palette generation.
Part 2: Color theory to code delves into the possibilities of translating aesthetic rules into algorithms.
Part 3: Using input to control the palette generation elaborates on the use of input variables to make generated palettes controllable through script.
Part 4: Customizing the generation for specific purposes gives some examples on how to get the most out of your procedurally generated palettes.
Part 5: Applying a palette to a Unity scene explains some ways to apply the generated palette on a scene in Unity. This part is pretty straightforward, and completely Unity-focused.
Part 6: Resources contains links to relevant articles and a download of the example project.
Feel free to ask me questions on this topic on my social media (see below) or to tag me if you post something that you made with help of this tutorial. I would love to see some!