Views
974
Replies
15
Status
Closed
Does anyone know how photoshop converts RGB values into a single grayscale value when we convert a color image into grayscale mode?
I’m looking for a function like f that receives r,g,b and then gives gr.
gr = f(r,g,b)
I’ve checked some test values in photoshop and the function should the same results too.
for all entries that r,g,b are equal the result should be the same:
r=m , g=m , b=m ===> f(m,m,m) = m
it means that when the color itself is gray then it should not be changed during convertion.
other test values and results:
f(255, 0, 0) = 130 maximum pure red = 130, 130, 130 in grayscale
f(0, 255, 0) = 220 maximum pure green = 220, 220, 220 in grayscale
f(0, 0, 255) = 70 maximum pure blue = 70, 70, 70 in grayscale
it means that green in monitor seems brighter than other two and red seems
brighter than blue.
f(255, 255, 0) = 248
f(255, 0, 255) = 145
f( 0, 255, 255) = 228
2669458-25
I’m looking for a function like f that receives r,g,b and then gives gr.
gr = f(r,g,b)
I’ve checked some test values in photoshop and the function should the same results too.
for all entries that r,g,b are equal the result should be the same:
r=m , g=m , b=m ===> f(m,m,m) = m
it means that when the color itself is gray then it should not be changed during convertion.
other test values and results:
f(255, 0, 0) = 130 maximum pure red = 130, 130, 130 in grayscale
f(0, 255, 0) = 220 maximum pure green = 220, 220, 220 in grayscale
f(0, 0, 255) = 70 maximum pure blue = 70, 70, 70 in grayscale
it means that green in monitor seems brighter than other two and red seems
brighter than blue.
f(255, 255, 0) = 248
f(255, 0, 255) = 145
f( 0, 255, 255) = 228
2669458-25
How to Improve Photoshop Performance
Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!