Skip to content

Add alpha slider #9

@pdil

Description

@pdil

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?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions