Popularity
3.7
Growing
Activity
8.0
-
266
14
35

Programming language: C#
License: MIT License
Tags: Image Processing    
Latest version: v3.0.0-beta1

Colourful alternatives and similar packages

Based on the "Image Processing" category.
Alternatively, view Colourful alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Colourful or a related project?

Add another 'Image Processing' Package

README

Colourful logo Colourful .NET

Build status Tests codecov NuGet version NuGet downloads

Open source .NET library for working with color spaces.

The library is written in C# and released with an MIT license, so feel free to fork or use commercially.

Any feedback is appreciated, please visit the issues page or send me an e-mail.

Download

Binaries of the last build can be downloaded on the AppVeyor CI page of the project.

The library is also published on NuGet.org, install using:

PM> Install-Package Colourful

Colourful is CLS Compliant (to allow use in VB.NET etc.) and is built for these target frameworks:

  • .NET 6
  • .NET Framework 4.5
  • .NET Standard 2.0
  • .NET Standard 1.1
  • For older .NET Framework 4.0 see version 1 of the library.

Usage

Example "hello world" usage that converts a color from sRGB to XYZ (keeping the D65 white point):

IColorConverter<RGBColor, XYZColor> converter = new ConverterBuilder()
    .FromRGB(RGBWorkingSpaces.sRGB)
    .ToXYZ(Illuminants.D65)
    .Build();

RGBColor rgbColor = new RGBColor(1, 0, 0.5);
XYZColor xyzColor = converter.Convert(rgbColor); // XYZ [X=0.45, Y=0.23, Z=0.22]

Documentation

Please see the docs pages below for various topics:

  • [Conversion between color spaces](docs/topic-conversion.md)
    • also handles chromatic adaptation with multiple possible LMS transformation matrices:
    • Bradford (default)
    • Von Kries (Hunt-Pointer-Estevez adjusted for D65)
    • Von Kries (Hunt-Pointer-Estevez for equal energy)
    • XYZ scaling
    • Spectral-sharpened Bradford
    • CMCCAT2000
    • CAT02
    • (user-defined chromatic adaptation matrix)
  • [Correlated color temperature (CCT)](docs/topic-cct.md)
    • Planckian locus approximation method
  • [Ranges of channel values and clamping](docs/topic-clamp.md)
  • [Computing color difference](docs/topic-color-difference.md)
    • multiple algorithms supported:
    • CIE Delta-E 1976
    • CMC l:c (1984)
    • CIE Delta-E 1994
    • CIE Delta-E 2000
    • JzCzhz Delta-Ez
    • Euclidean distance
  • [Cylindrical color spaces](docs/topic-cylindrical-spaces.md)
  • [Illuminants and white points](docs/topic-illuminants.md)
    • white points are handled correctly throughout the conversions
    • multiple illuminant are built-in:
    • A (Incandescent / Tungsten)
    • B (Direct sunlight at noon (obsolete))
    • C (Average / North sky Daylight (obsolete))
    • D50 (Horizon Light. ICC profile PCS)
    • D55 (Mid-morning / Mid-afternoon Daylight)
    • D65 (Noon Daylight: Television, sRGB color space)
    • D75 (North sky Daylight)
    • E (Equal energy)
    • F2 (Cool White Fluorescent)
    • F7 (D65 simulator, Daylight simulator)
    • F11 (Philips TL84, Ultralume 40)
    • (user-defined white points)
  • [Macbeth ColorChecker chart](docs/topic-macbeth-color-checker.md)
  • [Changes between v2 and v3](docs/topic-changes-v2-v3.md)

For information about specific color spaces, see the following docs pages:

  • [RGB color spaces](docs/spaces-rgb.md)
    • support for both ordinary RGB and linear RGB
    • multiple working spaces supported:
    • sRGB
    • Simplified sRGB
    • ECI RGB v2
    • Adobe RGB (1998)
    • Apple sRGB
    • Best RGB
    • Beta RGB
    • Bruce RGB
    • CIE RGB
    • ColorMatch RGB
    • Don RGB 4
    • Ekta Space PS5
    • NTSC RGB
    • PAL/SECAM RGB
    • ProPhoto RGB
    • SMPTE-C RGB
    • Wide Gamut RGB
    • Rec. 709 (ITU-R Recommendation BT.709 – HDTV)
    • Rec. 2020 (ITU-R Recommendation BT.2020 – UHDTV)
    • (user-defined RGB working spaces)
  • [Lab color spaces](docs/spaces-lab.md)
    • CIE L*a*b* (1976) (CIELAB)
    • CIE L*C*h°ab (CIELCH)
    • Hunter Lab
  • [Luv color spaces](docs/spaces-luv.md)
    • CIE L*u*v* (1976) (CIELUV)
    • CIE L*C*h°uv (CIELCH)
  • [XYZ color space](docs/spaces-xyz.md)
    • CIE XYZ (1931)
    • CIE xyY (derived from XYZ)
  • [Jzazbz color spaces](docs/spaces-jzazbz.md)
    • Jzazbz (Safdar & al., 2017)
    • JzCzhz (polar of Jzazbz)
  • [LMS color space](docs/spaces-lms.md)
  • [xy chromaticity](docs/spaces-xy.md)


*Note that all licence references and agreements mentioned in the Colourful README section above are relevant to that project's source code only.