Palettes
The Color Pro package includes two ScriptableObject types for representing color and material palettes. Either palette type can be created from Unity's asset menu:
Assets > Create > Zigurous > Color Pro > ...
🎨 Color Palette
The ColorPalette type stores an array of colors. The palette can be converted to a material palette if desired. The Color Pro package also includes predefined color palette assets containing the colors of every mixing model.
ColorPalette palette;
// Set or add colors
palette[index] = color;
palette.Add(color);
// Get colors from the palette
Color color = palette[index];
Color random = palette.Random();
// Convert to material palette
MaterialPalette materialPalette = palette.Convert(baseMaterial);
🔮 Material Palette
The MaterialPalette stores an array of materials.
The palette can be converted to a color palette if desired.
MaterialPalette palette;
// Set or add materials
palette[index] = material;
palette.Add(material);
// Get materials from the palette
Material material = palette[index];
Material random = palette.Random();
// Convert to color palette
ColorPalette colorPalette = palette.Convert();