Assets/FlexibleColorPicker/Scripts/FlexibleColorPicker.cs
/// <summary>
/// Get normalized 2D value of the current color according to the main picker mode.
/// This value can be used to adjust the position of the 2D marker.
/// </summary>
Get normalized 2D value of the current color according to the main picker mode.
This value can be used to adjust the position of the 2D marker.
Get normalized 2D value of the current color according to the main picker mode . This value can be used to adjust the position of the 2D marker .
private Vector2 GetValue(MainPickingMode mode) {
        switch(mode) {
        case MainPickingMode.HS: return new Vector2(GetValue1D(PickerType.H), GetValue1D(PickerType.S));
        case MainPickingMode.HV: return new Vector2(GetValue1D(PickerType.H), GetValue1D(PickerType.V));
        case MainPickingMode.SH: return new Vector2(GetValue1D(PickerType.S), GetValue1D(PickerType.H));
        case MainPickingMode.SV: return new Vector2(GetValue1D(PickerType.S), GetValue1D(PickerType.V));
        case MainPickingMode.VH: return new Vector2(GetValue1D(PickerType.V), GetValue1D(PickerType.H));
        case MainPickingMode.VS: return new Vector2(GetValue1D(PickerType.V), GetValue1D(PickerType.S));
        default: throw new Exception("Unkown main picking mode: " + mode);
        }
    }
private Vector2 GetValue ( MainPickingMode mode ) { switch ( mode ) { case MainPickingMode . HS : return new Vector2 ( GetValue1D ( PickerType . H ) , GetValue1D ( PickerType . S ) ) ; case MainPickingMode . HV : return new Vector2 ( GetValue1D ( PickerType . H ) , GetValue1D ( PickerType . V ) ) ; case MainPickingMode . SH : return new Vector2 ( GetValue1D ( PickerType . S ) , GetValue1D ( PickerType . H ) ) ; case MainPickingMode . SV : return new Vector2 ( GetValue1D ( PickerType . S ) , GetValue1D ( PickerType . V ) ) ; case MainPickingMode . VH : return new Vector2 ( GetValue1D ( PickerType . V ) , GetValue1D ( PickerType . H ) ) ; case MainPickingMode . VS : return new Vector2 ( GetValue1D ( PickerType . V ) , GetValue1D ( PickerType . S ) ) ; default : throw new Exception ( " " + mode ) ; } }
Get normalized 2D value of the current color according to the main picker mode.
Get normalized 2D value of the current color according to the main picker mode .
mode
MainPickingMode