views:

185

answers:

2

I was wondering if anyone knows of a reliable Delta RGB formula or code snippet that does colour Delta of the full RGB tri stim values, like how DeltaE 2000/cmc does Lab/Lch that takes perceptual differences into account?. The RGB Colourspace could be any but if it needed to be a particular one I could keep it sRGB for the calculations. C# preferred, but I can convert from any language.

I currently have a very basic rgb delta formula, but I would like to implement something that gets a truer sense of perceptual colour difference. Current right now is

float delta = Math.Sqrt(Math.Pow(r1-r2, 2) + Math.Pow(g1-g2, 2) + Math.Pow(b1-b2, 2));

This is similar to DeltaE 76(lab) but has the same drawbacks where perceptual difference is not taken into account.

PLEASE dont just do a google search and paste the first thing you see! There are lots of Delta RGB formula's out there that may be found but do not take perceptual differences into account. If you have knowledge of this, please comment and/or paste any links to code samples. Also, I already have conversion from RGB to Lab/Lch and then into De2000/cmc. I am not looking for that.

Thanks in advance!

+1  A: 

I'm afraid you already gave the only right answer: conversion to a perceptual color space, where the simple delta formula makes sense.

Brilliant color scientists have been trying to answer the question of perceptual color differences for over a century. They've looked for a simple RGB formula that works, but human perception is just too complex.

palm3D
A: 

Just in case you didn't find them:

Best regards,

RockyRoad