PDColorPicker icon indicating copy to clipboard operation
PDColorPicker copied to clipboard

Add alpha slider

Open pdil opened this issue 8 years ago • 0 comments

There should be an alpha slider in addition to the hue slider to allow user to change transparency of color.

To-Do

  • [ ] Create generic "slider" class
    • Name: PDColorPickerSliderView
    • Allow initializer to define what color component the slider represents
    • Define background color or view to display when the transparency is less than 1.0
  • [ ] Create generic slider delegate protocol
    • Transmits whatever the changeable value is to the protocol implementer when changed
    • For example:
      protocol PDColorPickerSliderViewDelegate: class {
        func valueChanged(in slider: PDColorPickerSliderView, to newValue: CGFloat)
      }
      
  • [ ] Replace PDColorPickerViewController layout code with vertical UIStackView (brightness/saturation slider, hue slider, alpha slider) for easier management
  • [ ] Provide property in PDColorPickerViewController to display or hide alpha slider
    • If hidden, default of 1.0 is used
    • Possibly provide ability to set a different default alpha while still hiding the alpha slider?

pdil avatar Dec 12 '17 19:12 pdil