All Projects β†’ chrs1885 β†’ SheetyColors

chrs1885 / SheetyColors

Licence: MIT license
An action sheet styled color picker for iOS.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to SheetyColors

Pickr
🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
Stars: ✭ 3,759 (+3621.78%)
Mutual labels:  color, picker
Colorpickerwpf
Simple color picker control for WPF
Stars: ✭ 71 (-29.7%)
Mutual labels:  color, picker
Colorpicker
A mininal but complete colorpicker desktop app
Stars: ✭ 766 (+658.42%)
Mutual labels:  color, picker
ColorPick.js
A simple and minimal jQuery color picker plugin for the modern web.
Stars: ✭ 48 (-52.48%)
Mutual labels:  color, picker
Django Colorfield
color field for django models with a nice color-picker in the admin. 🎨
Stars: ✭ 238 (+135.64%)
Mutual labels:  color, picker
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (+168.32%)
Mutual labels:  color, picker
Swifthuecolorpicker
iOS HUE color picker
Stars: ✭ 44 (-56.44%)
Mutual labels:  color, picker
Swiftentrykit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.
Stars: ✭ 5,706 (+5549.5%)
Mutual labels:  actionsheet, uialertcontroller
Efcolorpicker
A lightweight color picker in Swift.
Stars: ✭ 205 (+102.97%)
Mutual labels:  color, picker
Color Picker
A simple color picker application written in pure JavaScript, for modern browsers.
Stars: ✭ 180 (+78.22%)
Mutual labels:  color, picker
a-color-picker
A color picker for web app
Stars: ✭ 97 (-3.96%)
Mutual labels:  color, picker
colr pickr
Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.
Stars: ✭ 27 (-73.27%)
Mutual labels:  color, picker
Alerts And Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
Stars: ✭ 5,267 (+5114.85%)
Mutual labels:  picker, uialertcontroller
Pixel Picker
A tiny menu bar application that helps you pick colours from your screen! πŸ”βœ¨
Stars: ✭ 318 (+214.85%)
Mutual labels:  color, picker
React Native Actions Sheet
A Cross Platform(Android & iOS) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
Stars: ✭ 412 (+307.92%)
Mutual labels:  picker, actionsheet
React Colorful
🎨 A tiny (2,5 KB) color picker component for React and Preact apps
Stars: ✭ 951 (+841.58%)
Mutual labels:  color, picker
Material Ui Color Picker
<ColorInput> component for material-ui
Stars: ✭ 74 (-26.73%)
Mutual labels:  color, picker
react-native-color-panel
React Native Color Panel Component for iOS and Android πŸ³οΈβ€πŸŒˆ
Stars: ✭ 21 (-79.21%)
Mutual labels:  color, picker
react-material-color-picker
react-material-color-picker component for selecting colors from google material color palette πŸ“ƒ
Stars: ✭ 19 (-81.19%)
Mutual labels:  color, picker
shape-color-dector
opencvζ£€ζ“¦ε½’ηŠΆε’Œι’œθ‰²
Stars: ✭ 17 (-83.17%)
Mutual labels:  color

Awesome Cocoapods(https://cocoapods.org/pods/SheetyColors) Carthage compatible UIKit & SwiftUI iOS 13 Ready Swift Build Status Twitter

SheetyColors is an action sheet styled color picker for iOS:

  • πŸ“± 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 & feel of all other native system dialogs. However, you can also chose to use the color picker it self without an action sheet.
  • 🎨 Fully configurable: You can choose between a variety of configurations such as
    • color model (RGB, HSB, or Grayscale)
    • alpha component support
    • haptic feedback
    • text/message label
  • 🎚️ Sliders and Hex input: You can create new colors by either using sliders or the newly added Hex input.
  • πŸ‘Ά 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.
  • 🍏 SwiftUI & 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.

Example

NEW: Hex input RGB, HSB, and Grayscale Fully configurable Dark mode support
Color picker supporting RGB, HSB, and Grayscale Color picker supporting RGB, HSB, and Grayscale Fully configurable Dark mode support

To get a quick overview, you can checkout the example app on Appetize.io. To run the example project from Xcode, clone the repo, and run pod install from the Example directory first.

Installation

There are currently four different ways to integrate SheetyColors into your apps.

CocoaPods

use_frameworks!

target 'MyApp' do
  pod 'SheetyColors'
end

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/chrs1885/SheetyColors.git", from: "1.2.1")
]

Carthage

github "chrs1885/SheetyColors"

Manually

Simply drop SheetyColors.xcodeproj into your project. Also make sure to add SheetyColors.framework to your app’s embedded frameworks found in the General tab of your main project.

Usage

Creating a SheetyColors picker is as easy as creating a normal .actionSheet styled UIAlertController. First, you need to import the library:

import SheetyColors

Next, simply create a SheetyColorsController instance and add some actions to it:

// Create a SheetyColors view with your configuration
let config = SheetyColorsConfig(alphaEnabled: true, initialColor: color, hapticFeedbackEnabled: true, title: "Create a color", type: .rgb)
let sheetyColors = SheetyColorsController(withConfig: config)

// Add a button to accept the selected color
let selectAction = UIAlertAction(title: "Save Color", style: .default, handler: { _ in
	self.color = sheetyColors.color
}
sheetyColors.addAction(selectAction)

// Add a cancel button
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
sheetyColors.addAction(cancelAction)

// Now, present it to the user
present(sheetyColors, animated: true, completion: nil)
        

Please check the documentation for further information on the API.

Custom container views

If you prefer to use the color picker inside a custom view controller, you can do so by creating the picker's view controller directly:

return SheetyColorsViewFactory.createView(withConfig: config, delegate: myDelegate)

The class of the myDelegate instance needs to conform to the SheetyColorsDelegate:

class MyViewController: SheetyColorsDelegate {

	...
	
	func didSelectColor(_ color: UIColor) {
	    self.color = color
	}
}

didSelectColor will be called on any slider change.

SwiftUI support

With 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:

struct ContentView: View {
	@State var selectedColor: UIColor = UIColor.white
	let config = SheetyColorsConfig(alphaEnabled: true, hapticFeedbackEnabled: true, initialColor: UIColor.red, type: .rgb)

	var body: some View {
		Text("Select a color")
			.foregroundColor(Color(self.$selectedColor.wrappedValue))
		SheetyColorsView(config: config, color: self.$selectedColor)
	}
}

Here's an example of how creating an action sheet styled color picker with SwiftUI and SheetyColors.

Contributions

We'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.

License

SheetyColors is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].