Skip to content
Convert colors from one color space to another. Find the closest "named" color.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ColorConverter
ColorConverterTester
.gitignore
CSharpColorSpaceConverter.sln
LICENSE
icon.png
logo.png
logo.svg
readme.md

readme.md

logo

CONVERSIONS

  • RGB -> HSL
  • RGB -> Lab
  • RGB -> XYZ
  • RGB -> Hex
  • RGB -> "Named Color"
  • HSL -> RGB
  • XYZ -> Lab

EXAMPLE USAGE

using CSharpColorSpaceConverter;
var color = ColorSpaceConverter.RGBToNamedColor(111, 190, 107);
Console.WriteLine(color);
> Mantis (114, 193, 102)

SOURCE

NUGET

PM> Install-Package ColorSpaceConverter -Version 1.0.3

JUST GIVE ME THE FILE PLEASE

You got it boss: ColorSpaceConverter.cs

NOTES

  • The list of named colors was scraped from Wikipedia around 2013.
  • Not all conversions may appear accurate. I'm not sure how it works. I just copied the code. Something about lighting.
  • If you are looking for a color picker that gives named colors I have one here.

ABOUT

Over the years I've had to keep going back to easyrgb.com to lookup these conversions so I decided to put them into a repository.

You can’t perform that action at this time.