ColorPickerRange

Allow to select color in specified range of two colors.
Two versions: ColorPickerRange and ColorPickerRangeHSV.
HSV version can help to avoid getting dirty colors in between.

Options

  • Slider Slider

    Slider to change color.

  • SliderBackground Image

    Image to display color gradient using the specified shader.

  • DefaultShaderHorizontal Shader

    Shader to display color gradient if slider is horizontal.

  • DefaultShaderVertical Shader

    Shader to display color gradient if slider is vertical.

  • ColorLeft Color

    Color on the left side (or bottom if slider is vertical).

  • ColorRight Color

    Color on the right side (or top if slider is vertical).

  • Color Color

    Selected color.

Events

  • OnChange UnityEvent<Color32>

    The event raised when color changed.

Set color

ColorPickerRange.Color = Color.cyan;

Get color

Debug.Log(ColorPickerRange.Color);

Add listener

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

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