{"id":916,"url":"https://github.com/chrs1885/SheetyColors","last_synced_at":"2025-08-06T13:32:04.534Z","repository":{"id":62455282,"uuid":"174486865","full_name":"chrs1885/SheetyColors","owner":"chrs1885","description":"An action sheet styled color picker for iOS.","archived":false,"fork":false,"pushed_at":"2021-06-19T14:10:18.000Z","size":20041,"stargazers_count":106,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-11-13T23:49:02.976Z","etag":null,"topics":["actionsheet","color","ios","picker","swift","uialertcontroller"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrs1885.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-08T07:07:28.000Z","updated_at":"2024-07-09T08:59:11.000Z","dependencies_parsed_at":"2022-11-02T00:16:45.497Z","dependency_job_id":null,"html_url":"https://github.com/chrs1885/SheetyColors","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrs1885%2FSheetyColors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrs1885%2FSheetyColors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrs1885%2FSheetyColors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrs1885%2FSheetyColors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrs1885","download_url":"https://codeload.github.com/chrs1885/SheetyColors/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905441,"owners_count":17989766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actionsheet","color","ios","picker","swift","uialertcontroller"],"created_at":"2024-01-05T20:15:34.579Z","updated_at":"2024-12-09T14:30:42.831Z","avatar_url":"https://github.com/chrs1885.png","language":"Swift","funding_links":[],"categories":["Color","Libs","UI and SwiftUI","Colors [🔝](#readme)"],"sub_categories":["Linter","Colors"],"readme":"[![Awesome](https://camo.githubusercontent.com/13c4e50d88df7178ae1882a203ed57b641674f94/68747470733a2f2f63646e2e7261776769742e636f6d2f73696e647265736f726875732f617765736f6d652f643733303566333864323966656437386661383536353265336136336531353464643865383832392f6d656469612f62616467652e737667)](https://github.com/vsouza/awesome-ios#color)\n![Cocoapods(https://cocoapods.org/pods/SheetyColors)](https://img.shields.io/cocoapods/v/SheetyColors.svg)\n[![Carthage compatible](https://img.shields.io/badge/carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage)\n![UIKit \u0026 SwiftUI](https://img.shields.io/badge/iOS-UIKit%20%26%20SwiftUI-yellow)\n![iOS 13 Ready](https://img.shields.io/badge/iOS%2013-Ready-blueviolet)\n![Swift](https://img.shields.io/badge/swift-5.0-red.svg)\n[![Build Status](https://app.bitrise.io/app/e955e72e7da4b8c0/status.svg?token=wOm6zBpCFw7ZeP8gJdDE_A\u0026branch=develop)](https://app.bitrise.io/app/e955e72e7da4b8c0)\n[![Twitter](https://img.shields.io/badge/twitter-%40chr__wendt-58a1f2.svg)](https://twitter.com/chr_wendt)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Documentation/sheetycolors.png\" width=\"400\"\u003e\n\u003c/p\u003e\n\n**SheetyColors** is an action sheet styled color picker for iOS:\n\n- 📱 **Based on UIAlertController:** The SheetyColors API is based on UIKit's `UIAlertController`. Simply add buttons to it as you would for any other Action Sheet by defining `UIAlertAction` instances. Therefore, it nicely integrates with the look \u0026 feel of all other native system dialogs. However, you can also chose to use the color picker it self without an action sheet.\n- 🎨 **Fully configurable:** You can choose between a variety of configurations such as \n\t- color model (RGB, HSB, or Grayscale)\n\t- alpha component support\n\t- haptic feedback\n\t- text/message label\n- 🎚️ **Sliders and Hex input:** You can create new colors by either using sliders or the newly added Hex input.\n- 👶 **Intuitive UI:** Each slider comes with a gradient that gives you an idea of how changing individual slider values affects the resulting color. All controls do support haptic feedback and will react to any errors such as invalid Hex values.\n- 🍏 **SwiftUI \u0026 iOS 13 support:** SheetyColors can also be used as part of your SwiftUI projects. Have a look at the *Usage* section to get further info. The library is also optimized to work well with the new Dark Mode.\n\n## Example\n| NEW: Hex input |RGB, HSB, and Grayscale|Fully configurable|Dark mode support|\n| :-: | :-: | :-: | :-: |\n|![Color picker supporting RGB, HSB, and Grayscale][hex_input]|![Color picker supporting RGB, HSB, and Grayscale][minimum_config]|![Fully configurable][fully_configurable]|![Dark mode support][dark_mode]|\n\n[hex_input]: ./Documentation/hex_input.gif \"New Hex input field\"\n[minimum_config]: ./Documentation/demo_minimum_configuration.png \"Color picker supporting RGB, HSB, and Grayscale\"\n[fully_configurable]: ./Documentation/demo_customizable.png \"Fully configurable\"\n[dark_mode]: ./Documentation/demo_dark_mode.png \"Dark mode support\"\n\nTo get a quick overview, you can checkout the example app on [Appetize.io](https://appetize.io/embed/gggkv26ep4xn6819f181ffqxpw?device=iphonex\u0026scale=75\u0026autoplay=false\u0026orientation=portrait\u0026deviceColor=black). To run the example project from Xcode, clone the repo, and run `pod install` from the Example directory first.\n\n## Installation\n\nThere are currently four different ways to integrate **SheetyColors** into your apps.\n\n### CocoaPods\n\n```ruby\nuse_frameworks!\n\ntarget 'MyApp' do\n  pod 'SheetyColors'\nend\n```\n\n### Swift Package Manager\n\n```ruby\ndependencies: [\n    .package(url: \"https://github.com/chrs1885/SheetyColors.git\", from: \"1.2.1\")\n]\n```\n\n### Carthage\n\n```ruby\ngithub \"chrs1885/SheetyColors\"\n```\n\n### Manually\n\nSimply drop `SheetyColors.xcodeproj` into your project. Also make sure to add\n`SheetyColors.framework` to your app’s embedded frameworks found in the General tab of your main project.\n\n## Usage\n\nCreating a SheetyColors picker is as easy as creating a normal `.actionSheet` styled `UIAlertController`. First, you need to import the library:\n\n```swift\nimport SheetyColors\n```\n\nNext, simply create a `SheetyColorsController` instance and add some actions to it:\n\n```swift\n\n// Create a SheetyColors view with your configuration\nlet config = SheetyColorsConfig(alphaEnabled: true, initialColor: color, hapticFeedbackEnabled: true, title: \"Create a color\", type: .rgb)\nlet sheetyColors = SheetyColorsController(withConfig: config)\n\n// Add a button to accept the selected color\nlet selectAction = UIAlertAction(title: \"Save Color\", style: .default, handler: { _ in\n\tself.color = sheetyColors.color\n}\nsheetyColors.addAction(selectAction)\n\n// Add a cancel button\nlet cancelAction = UIAlertAction(title: \"Cancel\", style: .cancel, handler: nil)\nsheetyColors.addAction(cancelAction)\n\n// Now, present it to the user\npresent(sheetyColors, animated: true, completion: nil)\n        \n```\n\nPlease check the [documentation](./Documentation/Reference/README.md) for further information on the API.\n\n### Custom container views\nIf you prefer to use the color picker inside a custom view controller, you can do so by creating the picker's view controller directly:\n\n```swift\nreturn SheetyColorsViewFactory.createView(withConfig: config, delegate: myDelegate)\n\n```\n\nThe class of the `myDelegate` instance needs to conform to the `SheetyColorsDelegate`:\n\n```swift\nclass MyViewController: SheetyColorsDelegate {\n\n\t...\n\t\n\tfunc didSelectColor(_ color: UIColor) {\n\t    self.color = color\n\t}\n}\n```\n\n`didSelectColor` will be called on any slider change.\n\n### SwiftUI support\nWith SwiftUI projects the color picker can't be used inside the action sheet that Apple provides. However, you can embed the view inside your custom view container by using the `SheetyColorsView`:\n\n```swift\nstruct ContentView: View {\n\t@State var selectedColor: UIColor = UIColor.white\n\tlet config = SheetyColorsConfig(alphaEnabled: true, hapticFeedbackEnabled: true, initialColor: UIColor.red, type: .rgb)\n\n\tvar body: some View {\n\t\tText(\"Select a color\")\n\t\t\t.foregroundColor(Color(self.$selectedColor.wrappedValue))\n\t\tSheetyColorsView(config: config, color: self.$selectedColor)\n\t}\n}\n```\n\n[Here's an example](https://gist.github.com/chrs1885/d3b9310f92a247b1ad6e022896596401) of how creating an action sheet styled color picker with SwiftUI and SheetyColors.\n\n## Contributions\n\nWe'd love to see you contributing to this project by proposing or adding features, reporting bugs, or spreading the word. Please have a quick look at our [contribution guidelines](./.github/CONTRIBUTING.md).\n\n## License\n\nSheetyColors is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrs1885%2FSheetyColors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrs1885%2FSheetyColors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrs1885%2FSheetyColors/lists"}