# [Bf-committers] Color to greyscale conversion - confusion

Jeroen Bakker j.bakker at atmind.nl
Sat Jun 23 09:05:52 CEST 2012

```Hi

Well as already said, there is no correct formula. Also if you think
about what the method does it is basically two things:

1. mimic black and white conversion by multiplying the color channels
with a certain value. Enhancing a light-channel to influence the BW more.
nR = nG = nB = 0.2126 R + 0.7152 G + 0.0722 B
2. do a conversion to an undefined color space. (if you may call it a
color space)
Value = (nR+nG+nB)/3 // as nR NG & nB are same, we can optimize to value=nR

There are many aperature plugins only to mimic black and white
conversion (silver efex pro) in case for the compositor. But Campbell
has a point that we don't have a clue when to use which and why. There
are to many assumptions that is not clear in the method name.

Luminance is chosen as it works best in most cases.
see here comparison between the different algoritms
http://www.tannerhelland.com/3643/grayscale-image-algorithm-vb6/

"A full discussion of which formula is “better” is beyond the scope of
Charles Poynton <http://poynton.com/>. For 99% of programmers, the
difference between these two formulas is irrelevant."
- But we are the 1% right :) -
Jeroen.

On 06/23/2012 04:27 AM, Troy Sobotka wrote:
> On Jun 22, 2012 11:56 AM, "CoDEmanX" <codemanx
> <codemanx at gmx.de>@<codemanx at gmx.de>
> gmx.de <codemanx at gmx.de>> wrote:
>> but correct seems to be:
>>
>> Y = 0.2126 R + 0.7152 G + 0.0722 B
> Again, there is no singular "correct".
>
> I believe the above is a luminance based conversion from linearized sRGB.
>
> With respect,
> TJS
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>

--

Met vriendelijke groet,

Jeroen Bakker

*At Mind BV
*

Telefoon: 06 50 611 262
E-mail: j.bakker at atmind.nl <mailto:j.bakker at atmind.nl>

```