A Color Picker for watchOS
I believe that SwiftUI team could definetly sketch and make a color picker for watchOS.
But they just didn't.
So I had to make a color picker by my own, in order to select a color on Watch.
- Select Color in List
- Adjust Color in Sliders
- Supports RGB & HSB
- Supports Opacity Edit
- Reset to default color
- Check Color Details
- Hex Code
- Opacity
- RGB & HSB Values
- CMYK Values (only for reference)
VelaPicker(color: $color, defaultColor: Color.blue, allowOpacity: true, allowRGB: true, allowHSB: true, allowCMYK: true, HSB_primary: false, label: {Text("Vela")}, onSubmit: {print("Vela color submitted")})color: Binding<Color> determine what is the color.
defaultColor: Color? allows users to reset their color to the default one
Default as nil
allowOpacity: Bool shows if the opacity value is allowed to be seen and changed.
Default as true
allowRGB: Bool, allowHSB: Bool, allowCMYK: Bool determines if the values will be shown in the details view and if it's available to be edited via sliders (except CMYK)
Default as true
HSB_primary: Bool can make HSB the primary option for checking and editing the color.
Default as false
aboutLinkIsHidden
aboutLinkIsHidden: Bool affects the color details sheet, determine if the About link in it will be hidden or not.
Please use VelaSettingsView() to add a link to the About page if you hide it.
Default as false
label: () -> L recieves a view for the picker's label.
Default as Text("Vela")
onSubmit: () -> Void receives actions and will be run when the sheet is closed.
This works like onSubmit in the native SwiftUI.
Default as {} (runs nothing when submit)
You SHALL NOT remove declarement in the program, unless you declared it somewhere else in an obvious place, like package credits
If Vela is unable to be enabled, such as in watchOS 9, then this text could be removed.
ThreeManager785
- Design
- Develop
- Acknowlegements Learning
- Almost Everything, I think
WindowsMEMZ
- Debug
Vela collects literally nothing.
It only stores 2 setting values.
No data are shared or uploaded to neither other devices nor the Internet.
Vela won't be able to know what color you've inputted.
I picked "Vela" from the constellation list in Wikipedia. I thought is was a good name and I added it into my note, then gave it to her (Vela).
I would never thought that Xiaomi picked Vela too. I wanna declare that Garden Vela has no connection to Xiaomi Vela, it's just a color picker.
Garden Vela doesn't make any profit, and it's just coincidence for having the same name with Xiaomi Vela. Please do not sue me, please.