Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 794 Bytes

README.md

File metadata and controls

46 lines (32 loc) · 794 Bytes

unity-immediate-color-picker

Color picker for Unity in immediate GUI mode.

Demo

Usage

in a MonoBehaviour,

IMColorPicker colorPicker;

void OnGUI()
{
    if(colorPicker == null)
    {
        colorPicker = new IMColorPicker();
    }
    colorPicker.DrawWindow(); // draw color picker UI with GUI.Window
    colorPicker.DrawColorPicker(); // or draw color picker UI only
}

You can use color presets with IMColorPreset(ScriptableObject).

public IMColorPreset preset;
IMColorPicker colorPicker;

void OnGUI()
{
    if(colorPicker == null)
    {
        colorPicker = new IMColorPicker(preset);
    }
    // ...
}

See example scenes for details.