ColorPalette is used on any Color property, and allows for choosing colors from different definable palettes.

Use this to allow the user to choose from a set of predefined color options.

namespace Sirenix.OdinInspector
[AttributeUsageAttribute((AttributeTargets)384, AllowMultiple = False, Inherited = True)]
public sealed class ColorPaletteAttribute : Attribute


Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector


Definition Description
ColorPaletteAttribute() Adds a color palette options to a Color property.
ColorPaletteAttribute(string) Adds color options to a Color property from a specific palette.


Return Type Definition Description
string PaletteName Gets the name of the palette.
bool ShowAlpha Indicates if the color palette should show alpha values or not.


The following example shows how ColorPalette is applied to a property. The user can freely choose between all available ColorPalettes.

public class ColorPaletteExamples : MonoBehaviour
    public Color ColorOptions;

    public Color UnderwaterColor;

    [ColorPalette("Fall"), HideLabel]
    public Color WideColorPalette;

    [ColorPalette("My Palette")]
    public Color MyColor;

    public Color[] ColorArray;