Skip to content

Project on third party package ColorThief for UWP application

License

Notifications You must be signed in to change notification settings

kundanhere/ColorThief.UWP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub release (latest by date including pre-releases) GitHub GitHub repo size

Get Dominant Color

A code for grabbing the dominant color from an image. Uses ColorThief for C# and .NET to make it happen.

Compatibility:

Operating System Architecture Supported Version
Windows 10 x86, x64, ARM, ARM64 Yes 16299 or higher
Windows 8.1 x86, x64 No
Windows 8 x86, x64 No
Windows 7 x86, x64 No

How to use ColorThief

Get the dominant color from an image

var colorThief = new ColorThief();
colorThief.GetColor(sourceImage);

Build a color palette from an image

In this example, we build an 8 color palette.

var colorThief = new ColorThief();
colorThief.GetPalette(sourceImage, 8);

For Xamarin.Forms

await CrossColorThief.Current.GetPalette(sourceImage);

How to build and run the program

Build

  1. Start Microsoft Visual Studio and select File > Open > Project/Solution.
  2. Go to the folder where you unzipped the sample. Double-click the Visual Studio Solution (.sln) file.
  3. Press Ctrl+Shift+B, or select Build > Build Solution.

Run

After opening the Visual Studio solution, set the architecture to x64 or x86. The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.

  1. Deploy

    • Select Build > Deploy Solution.
  2. Deploy and run

    • To debug the sample and then run it, press F5 or select Debug > Start Debugging.
    • To run the sample without debugging, press Ctrl+F5 or select Debug > Start Without Debugging.

License

ColorThief.UWP is a MIT-style licensed, as found in the LICENSE file.

About

Project on third party package ColorThief for UWP application

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages