{"id":913,"url":"https://github.com/joncardasis/ChromaColorPicker","last_synced_at":"2025-08-06T13:32:03.320Z","repository":{"id":10461873,"uuid":"63897257","full_name":"joncardasis/ChromaColorPicker","owner":"joncardasis","description":":art: An intuitive iOS color picker built in Swift.","archived":false,"fork":false,"pushed_at":"2024-02-13T01:38:27.000Z","size":10237,"stargazers_count":569,"open_issues_count":18,"forks_count":127,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-27T11:36:23.989Z","etag":null,"topics":["carthage","cocoapods","color","color-palette","color-picker","color-theme","customizable","ios","ios-animation","swift","swift5"],"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/joncardasis.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-21T19:35:31.000Z","updated_at":"2024-11-02T17:59:47.000Z","dependencies_parsed_at":"2024-06-18T21:15:22.035Z","dependency_job_id":"48dc8e70-c973-4f53-becc-70f9e2949ff1","html_url":"https://github.com/joncardasis/ChromaColorPicker","commit_stats":{"total_commits":136,"total_committers":13,"mean_commits":"10.461538461538462","dds":0.4632352941176471,"last_synced_commit":"4fa7a0b3cb779d97b771a5bf0de8927d6a37153f"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joncardasis%2FChromaColorPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joncardasis%2FChromaColorPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joncardasis%2FChromaColorPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joncardasis%2FChromaColorPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joncardasis","download_url":"https://codeload.github.com/joncardasis/ChromaColorPicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905442,"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":["carthage","cocoapods","color","color-palette","color-picker","color-theme","customizable","ios","ios-animation","swift","swift5"],"created_at":"2024-01-05T20:15:34.509Z","updated_at":"2024-12-09T14:30:44.242Z","avatar_url":"https://github.com/joncardasis.png","language":"Swift","funding_links":[],"categories":["Color","Libs","UI and SwiftUI","Colors [🔝](#readme)"],"sub_categories":["Linter","Colors","Other free courses"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/Logo.png\" width=\"480\" max-width=\"90%\" alt=\"ChromaColorPicker 2.0\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Swift-5.0-orange.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/platform-iOS-lightgray.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Cocoapods-✔-green.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Carthage-✔-green.svg\" /\u003e\n  \u003cimg src=\"https://travis-ci.com/joncardasis/ChromaColorPicker.svg?branch=master\" /\u003e\n\u003c/p\u003e\n\nAn intuitive HSB color picker built in Swift. Supports multiple selection handles and is customizable to your needs.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/ChromaColorPicker.gif\" width=\"80%\" alt=\"ChromaColorPicker GIF\" /\u003e\n\u003c/p\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLooking for version 1.x?\u003c/b\u003e\u003c/summary\u003e\nVersion 1.x.x can be found on the \u003cb\u003elegacy\u003c/b\u003e branch. While the pod is still available, it is deprecated and projects should migrate to 2.0.\u003cbr/\u003e\n\u003cimg src=\"../assets/Screenshot-With-BG.png?raw=true\" height=\"350\"\u003e\n\u003c/details\u003e\n\n## Examples\n```Swift\nlet colorPicker = ChromaColorPicker(frame: CGRect(x: 0, y: 0, width: 300, height: 300))\naddSubview(colorPicker)\n\n// Optional: Attach a ChromaBrightnessSlider to a ChromaColorPicker\nlet brightnessSlider = ChromaBrightnessSlider(frame: CGRect(x: 0, y: 0, width: 280, height: 32))\naddSubview(brightnessSlider)\n\ncolorPicker.connect(brightnessSlider) // or `brightnessSlider.connect(to: colorPicker)`\n```\n\n- View the _Example_ app for more.\n\n## Usage\n### Multiple Handles\n```Swift\n// Add handle at color\nlet peachColor = UIColor(red: 1, green: 203 / 255, blue: 164 / 255, alpha: 1)\ncolorPicker.addHandle(at: peachColor)\n\n// Add handle with reference\nlet customHandle = ChromaColorHandle()\ncustomHandle.color = UIColor.purple\ncolorPicker.addHandle(customHandle)\n\n// Add handle and keep reference\nlet handle = colorPicker.addHandle(at: .blue)\n```\n\n### Custom Handle Icon\n```Swift\nlet homeHandle = ChomaColorHandle(color: .blue)\nlet imageView = UIImageView(image: #imageLiteral(resourceName: \"home-icon\").withRenderingMode(.alwaysTemplate))\nimageView.contentMode = .scaleAspectFit\nimageView.tintColor = .white\nhomeHandle.accessoryView = imageView\nhomeHandle.accessoryViewEdgeInsets = UIEdgeInsets(top: 2, left: 4, bottom: 4, right: 4)\n\ncolorPicker.addHandle(homeHandle)\n```\n\n## Installation\n### Carthage\n```bash\ngithub \"joncardasis/ChromaColorPicker\"\n```\n\n### Cocoapods\n```bash\npod 'ChromaColorPicker'\n```\n### Manually\nAdd all files from the `Source` folder to your project.\n\n## Components\n| Component | Description |\n| :-------: | :---------: |\n| ChromaColorPicker | An HSB color picker with support for adding multiple color selection handles. |\n| ChromaBrightnessSlider | A slider UIControl which can be attached to any `ChromaColorPicker` via the `connect(to:)` method. ChromaBrightnessSlider can also function as a stand-alone UIControl. |\n\n## Supported UIControlEvents\nBoth `ChromaBrightnessSlider` and `ChromaColorPicker` conform to UIControl. Each send UIControlEvents which can be observed via via `UIControl`'s `addTarget` method.\n\n_ChromaColorPicker_\n| Event              | Description  |\n| :-----------------:|:-------------|\n| `.valueChanged`    | Called whenever the color has changed. |\n| `.touchUpInside`   | Called when a handle is released. |\n\n_ChromaBrightnessSlider_\n| Event              | Description  |\n| :-----------------:|:-------------|\n| `.touchDown`       | Called when a the slider is grabbed. |\n| `.valueChanged`    | Called whenever the slider is moved and the value has changed. |\n| `.touchUpInside`   | Called when the slider handle is released. |\n\n```Swift\n// Example\nbrightnessSlider.addTarget(self, action: #selector(sliderDidValueChange(_:)), for: .valueChanged)\n\n@objc func sliderDidValueChange(_ slider: ChromaBrightnessSlider) {\n  print(\"new color: \\(slider.currentColor)\")\n}\n```\n\n## License\nChromaColorPicker 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%2Fjoncardasis%2FChromaColorPicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoncardasis%2FChromaColorPicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoncardasis%2FChromaColorPicker/lists"}