All Projects → muak → ColorMinePortable

muak / ColorMinePortable

Licence: MIT license
ColorMinePortable

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to ColorMinePortable

ColorHelper
No description or website provided.
Stars: ✭ 34 (-8.11%)
Mutual labels:  hex, hsl, rgb, cmyk, xyz
vscode-color
Helper with GUI to generate color codes such as CSS color notations.
Stars: ✭ 88 (+137.84%)
Mutual labels:  hex, hsl, rgb, hsb, cmyk
andColorPicker
Color picker library for Android
Stars: ✭ 233 (+529.73%)
Mutual labels:  lab, hsl, rgb, cmyk
color
A library of well-tested helper methods for working with colors.
Stars: ✭ 13 (-64.86%)
Mutual labels:  hex, hsl, rgb, hsb
colorsys.rs
Lib for modifying colors and converting to other spaces
Stars: ✭ 28 (-24.32%)
Mutual labels:  hex, hsl, rgb, cmyk
colors-convert
🦚 A simple colors library
Stars: ✭ 15 (-59.46%)
Mutual labels:  hex, hsl, rgb, cmyk
Farge
🎈Tell the name of hex color
Stars: ✭ 23 (-37.84%)
Mutual labels:  hex, hsl, rgb
Values.js
🍇 Get the tints and shades of a color
Stars: ✭ 97 (+162.16%)
Mutual labels:  hex, hsl, rgb
Alfred-Colors-workflow
hex <=> rgb <=> hsl
Stars: ✭ 28 (-24.32%)
Mutual labels:  hex, hsl, rgb
React Color Extractor
A React component which extracts colors from an image
Stars: ✭ 314 (+748.65%)
Mutual labels:  hex, hsl, rgb
tc-lib-color
PHP library to manipulate various color representations
Stars: ✭ 19 (-48.65%)
Mutual labels:  hsl, rgb, cmyk
ichiColor
Full features javascript color parser module, perfect work with vue.js; support RGB, HSL, HSV/HSB, HSL255, HSL240, HWB, XYZ, LAB, LUV, LHCab, xyY...
Stars: ✭ 23 (-37.84%)
Mutual labels:  lab, hsl, hsb
Colorhighlight
🎨 Lightweight Color Highlight colorizer for Sublime Text
Stars: ✭ 76 (+105.41%)
Mutual labels:  hex, hsl, rgb
colorsys
🎨 Minimalistic color converter for RGB, HSV, HSL, CMYK, HEX and CSS strings
Stars: ✭ 53 (+43.24%)
Mutual labels:  hex, rgb, cmyk
Gradstop
JavaScript micro library to generate gradient color stops 🏳️‍🌈
Stars: ✭ 144 (+289.19%)
Mutual labels:  hex, hsl, rgb
Culori
A comprehensive color library for JavaScript.
Stars: ✭ 271 (+632.43%)
Mutual labels:  hex, hsl, rgb
khroma
A collection of functions for manipulating CSS colors, inspired by SASS.
Stars: ✭ 28 (-24.32%)
Mutual labels:  hex, hsl, rgb
Colorpicker
A mininal but complete colorpicker desktop app
Stars: ✭ 766 (+1970.27%)
Mutual labels:  hex, rgb
Xcodecolorsense
🎈 An Xcode plugin that makes working with color easier
Stars: ✭ 79 (+113.51%)
Mutual labels:  hex, rgb
Color
A little library to deal with color conversions
Stars: ✭ 166 (+348.65%)
Mutual labels:  hex, rgb

ColorMinePortable

This is the library that it made ColorMine(https://github.com/THEjoezack/ColorMine) correspond to portable class library.

This program uses the following munsell data.

http://www.rit.edu/cos/colorscience/rc_munsell_renotation.php real.dat

Nuget Installation

Install-Package ColorMinePortable

Difference form original

  • Add ColorSpace
    • Munsell(approximate)
    • Hex
  • not supported CMYK profiles
  • changed HSL value range 0 to 1
  • changed HSV and HSB algorithm

Munsell Conversion

var munsell = new Munsell("5R 4/10");	//Chromatic color
var rgb = munsell.To<Rgb>();
var str = munsell.ToString(); // return "5R 4/10"
var retmunsell = rgb.To<Munsell>();	// approximate.  Not Equal "5R 4/10".

var munsell2 = new Munsell("N7.5"); //Achromatic color
var rgb2 = munsell2.To<Rgb>();

Hex Conversion

var hex  = new Hex("#FFFFFF");
var hex2 = new Hex("FFFFFF");	//  # none OK
var hex3 = new Hex("FFF");		// Triplet OK

var rgb = hex.To<Rgb>();
var code = hex.Code;	// return "#FFFFFF"
var rethex = rgb.To<Hex>();	// "#FFFFFF"

ColorMine

MIT Licensed .Net library that makes converting between color spaces and comparing colors easy.

Getting Started

ColorMine is available as a nuget package so you can install by searching for "ColorMine" in the "Manage Nuget Packages" menu, or run the following command in the Package Manager Console:

PM> Install-Package ColorMine

Color Conversions

You can convert between any supported color spaces via generic methods like so:

var myRgb = new Rgb { R = 149, G = 13, B = 12 }
var myCmy = myRgb.To<Cmy>();
var myXyz = new Xyz { X = .44, Y = .7, Z = .99 }
var myLab = myXyz.To<Lab>();
var myYxy = new Xyz { Y1 = .1124, X = .22, Y2 = .14 }
var myHsl = myYxy.To<Hsl>();

Cmyk conversion also supports profiles

var myCmyk = myRgb
    .WithProfile("~/JapanWebCoated.icc")
    .To<Cmyk>();
var myHunterLab = myCmyk
    .WithProfile("~/JapanWebCoated.icc")
    .To<HunterLab>();

Online example at http://colormine.org/color-converter

Delta-E

Delta-E calculations take and compare colors in any of the supported formats.

CIE76

double deltaE = myRgb.Compare(myCmy,new Cie1976Comparison());

CMC l:C

double deltaE = myXyz.Compare(myLab,new CmcComparison(lightness: 2, chroma: 1));

CIE94

double deltaE = myYxy.Compare(myHsl,new Cie94(Cie94Comparison.Application.GraphicArts));

CIE2000

double deltaE = myHunterLab.Compare(myLuv, new CieDe2000());

Huge thanks to Jonathan Hofinger for correct implementation of CieDe2000 and to Gaurav Sharma for test data.

Note: Delta-e calculations are quasimetric, the result of comparing color a to b isn't always equal to comparing color b to a...but it will probably be pretty close!


Currently Supported Color Spaces

  • CMY
  • CMYK
  • HSL
  • HSB
  • HSV
  • CIE L*AB
  • Hunter LAB
  • LCH
  • LUV
  • RGB
  • XYZ
  • YXY

Currently Supported Comparisons

  • CIE76
  • CMC l:c
  • CIE94
  • CIE2000
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].