ColorPicker

Options

  • Interactable bool

    Allow users interact with the ColorPicker.

  • RGBPalette ColorPickerRGBPalette

    Palette (Image and Slider) to select color by RGB.

  • RGBBlock ColorPickerRGBBlock

    Sliders and InputFields to select color by RGB.

  • HSVPalette ColorPickerHSVPalette

    Palette (Image and Slider) to select color by HSV.

  • HSVBlock ColorPickerHSVBlock

    Sliders and InputFields to select color by HSV.

  • ABlock ColorPickerABlock

    Slider and InputField to select color transparency.

  • HexBlock ColorPickerHexBlockBase

    InputField to select color by hex value.

  • ColorView ColorPickerColorBlock

    Block to display selected color with transparency.

  • ImagePalette ColorPickerImagePalette

    Image to select color from sprite.

  • InputMode ColorPickerInputMode

    Input block to display: None, HSV, RGB.

  • PaletteMode ColorPickerPaletteMode

    Palette block to display and it’s mode: None, Red, Green, Blue, Hue, Saturation, Value, HSVCircle, Image.

  • Color Color

    Selected color.

Events

  • OnChange UnityEvent<Color32>

    The event raised when color changed.

Set color

ColorPicker.Color = Color.cyan;

Get color

Debug.Log(ColorPicker.Color);

Add listener

void Start() => ColorPicker.OnChange.AddListener(ColorChanged);

void ColorChanged(Color32 color) => Debug.Log("selected color: " + Color);