« My NuGet Package for Color Conversion (RGB, HSL, HSV, CMYK, XYZ, LAB) | Main | Translating between Powershell, C#, and Python »
Sunday
Jul082012

My Color Conversion library, Colorspace, now available on NuGet - RGB, HSL, HSV, CMYK, XYZ, LAB  

This is a library I've been working on for a year – originally to help provide better automatic generation of colors for charts and reports. I found it was useful in several other projects so I've made it available as a NuGet package called Colorspace. It supports an number of conversions as shown below.

Snap000089

NuGet package: http://nuget.org/packages/Colorspace

Documentation: http://sdrv.ms/M7AE9g

EXAMPLE: RGB TO HSL

var a = new ColorRGB32Bit(255,0,0);
var b = new ColorRGB( a );
var c = new ColorHSL( b );

EXAMPLE: RGB TO LAB AND BACK

 

var workingspace = new Colorspace.RGBWorkingSpaces();
var a = new ColorRGB32Bit(255, 0, 0);
var b = new ColorRGB( a );
var c = new ColorXYZ(b, workingspace.SRGB_D65_Degree2);
var d = new ColorLAB(c, workingspace.SRGB_D65_Degree2);
var e = new ColorXYZ(d, workingspace.SRGB_D65_Degree2);
var f = new ColorRGB(e, workingspace.SRGB_D65_Degree2);
var g = new ColorRGB32Bit(f);

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>