{"id":22043613,"url":"https://github.com/melloskitten/pikko","last_synced_at":"2025-07-02T21:04:06.687Z","repository":{"id":41176295,"uuid":"149289160","full_name":"melloskitten/pikko","owner":"melloskitten","description":"Color picker for iOS made with ❤️","archived":false,"fork":false,"pushed_at":"2021-11-28T17:26:58.000Z","size":1637,"stargazers_count":37,"open_issues_count":2,"forks_count":11,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-06-12T05:17:06.650Z","etag":null,"topics":["cocoapod","cocoapods","color-picker","colorpicker","colors","ios","ios-app","ios-swift","open-source","swift","ui","ui-components","uicolor","uikit","ux"],"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/melloskitten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-18T13:02:24.000Z","updated_at":"2025-01-07T02:12:27.000Z","dependencies_parsed_at":"2022-08-25T15:10:54.973Z","dependency_job_id":null,"html_url":"https://github.com/melloskitten/pikko","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/melloskitten/pikko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melloskitten%2Fpikko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melloskitten%2Fpikko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melloskitten%2Fpikko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melloskitten%2Fpikko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melloskitten","download_url":"https://codeload.github.com/melloskitten/pikko/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melloskitten%2Fpikko/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263215240,"owners_count":23431881,"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":["cocoapod","cocoapods","color-picker","colorpicker","colors","ios","ios-app","ios-swift","open-source","swift","ui","ui-components","uicolor","uikit","ux"],"created_at":"2024-11-30T12:16:45.558Z","updated_at":"2025-07-02T21:04:06.299Z","avatar_url":"https://github.com/melloskitten.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pikko - iOS color picker made with ❤️\n\n[![CI Status](https://img.shields.io/travis/melloskitten/pikko.svg?style=flat)](https://travis-ci.org/melloskitten/pikko)\n[![Version](https://img.shields.io/cocoapods/v/Pikko.svg?style=flat)](https://cocoapods.org/pods/Pikko)\n[![License](https://img.shields.io/github/license/melloskitten/pikko.svg?style=flat)](https://cocoapods.org/pods/Pikko)\n[![Platform](https://img.shields.io/cocoapods/p/Pikko.svg?style=flat)](https://cocoapods.org/pods/Pikko)\n\n![Demo of pikko color picker](https://raw.githubusercontent.com/melloskitten/pikko/develop/doc/demo.gif)\n\nPikko is a simple and beautiful color picker for iOS. It's inspired by conventional color pickers from popular graphics tools such as _Photoshop_, _Paint Tool Sai_, _Procreate_ and many others. Pikko allows the selection of hue, saturation and brightness in a more pleasant way than boring sliders.\n\nFeel free to use, modify and improve. ✌️\n\n## Quickstart\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n\n### Initializing Pikko programmatically, without autoconstraints\n\nYou can intialize a new color picker in the following way:\n\n```swift\n// Initialize a new Pikko instance with width and height set to 300, and initialized to blue.\nlet pikko = Pikko(dimension: 300, setToColor: .blue)\n```\n\nMake sure to set the Pikko delegate to get updates on color changes:\n\n```swift\n// Set the PikkoDelegate to get notified on new color changes.\npikko.delegate = self\n```\nPositioning Pikko:\n\n```swift\n// Set Pikko center and add it to the main view.\npikko.center = self.view.center\nself.view.addSubview(pikko)\n```\n\nManually getting a color from Pikko and setting a color:\n```swift\n// Getting Pikko color.\nlet color = pikko.getColor()\n\n// Setting Pikko to a specific color.\npikko.setColor(.blue)\n```\n\n### Initializing Pikko programmatically, with autoconstraints\n\n```swift\n\n// Initialize a new Pikko instance.\nlet pikko = Pikko(dimension: 300, setToColor: .purple)\n\n// Set the PikkoDelegate to get notified on new color changes.\npikko.delegate = self\n\n// Set Pikko center and add it to the main view.\nself.view.addSubview(pikko)\n\n// Get the current color.\n_ = pikko.getColor()\n\n// Set autoconstraints.\npikko.translatesAutoresizingMaskIntoConstraints = false\npikko.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true\npikko.centerYAnchor.constraint(equalTo: self.view.centerYAnchor, constant: -200).isActive = true\n\n```\n\n### Initializing Pikko via Storyboard\n\nAdd a `UIView` to your Storyboard, then simply select `Pikko` as the class. You can add autoconstraints in the interface builder normally as you would with any other view.\n\n__NOTE:__ If you're using Pikko in the storyboard, you have to set the delegate and color in the `viewDidAppear` or `viewWillAppear` methods.\n\n```swift\n@IBOutlet weak var PikkoView: Pikko!\n\n/// If you add Pikko via interface builder and you want to set\n/// a color on your picker or set the delegate, make sure to \n/// call it from this method, NOT the viewDidLoad.\noverride func viewDidAppear(_ animated: Bool) {\n    PikkoView.delegate = self\n    PikkoView.setColor(.purple)\n}\n```\n\n###  Note\n\nRegardless how you are initializing Pikko, you will have to implement the `PikkoDelegate` protocol accordingly, which will look like something along these lines:\n\n```swift\n\nclass ViewController: UIViewController, PikkoDelegate {\n...\n\n// Delegate method that lets you get updates on the currently\n// selected color.\nfunc writeBackColor(color: UIColor) {\n    // TODO: Handle received color. \n}\n\n```\n\n## Installation\n\n### CocoaPods\n\nPikko is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Pikko'\n```\n\n### Swift Package Manager\n\nYou can also install Pikko via the [Swift Package Manager](https://swift.org/package-manager/). For this, follow the Apple tutorial on [how to add custom packages](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app), with this repository link as the package Git URL:\n\n```\nhttps://github.com/melloskitten/pikko\n```\n\n## Authors\n\nSandra, melloskitten@googlemail.com\n\nJohannes, mail@johannesrohwer.com\n\n## License\n\n__Pikko__ is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelloskitten%2Fpikko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelloskitten%2Fpikko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelloskitten%2Fpikko/lists"}