vpapenko / ColorPicker

Color pickers for Xamarin Forms.
MIT License
43 stars 11 forks source link
android c-sharp color-pickers colorpicker csharp dotnet ios uwp xamarin xamarin-forms

NuGet

CodeFactor

ColorPicker

ColorPicker is the multi-platform pack of color pickers for Xamarin Forms.

Supported platforms

Clor pickers

ColorWheel: color circle with alpha slider and luminosity slider.

ColorCircle: only color circle.

ColorTriangle

HSLSliders

RGBSliders

This library contains several base classes for custom color pickers.

TestApp

TestApp provides basic examples of how to use color pickers.

How to use

Add this package both to Xamarin Forms and platform-specific projects.

Add color picker as any other Xamarin Forms control.

iOS project

add

ColorPickerEffects.Init();

to AppDelegate.FinishedLaunching

UWP project

Replace

Xamarin.Forms.Forms.Init(e);

in OnLaunched of App.xaml.cs by

var rendererAssemblies = ColorPicker.UWP.ColorPickerEffects.GetRendererAssemblies();
Xamarin.Forms.Forms.Init(e, rendererAssemblies);

Useful properties

Common properties

SelectedColor It could be used to read selected color and to set the color to picker.

ConnectedColorPicker Multiple color pickers could be connected using this property. Bind color pickers one by one in chain.

WheelBackgroundColor For Color wheel and Color Triangle. Background inside outer ring.

Vertical Vertical slider.

ShowAlphaSlider

PickerRadiusScale

Color wheel

ShowLuminosityWheel

ShowLuminositySlider