Computer Color is Broken


If you put a colorful image into photoshop
or instagram and blur it, you’ll see a weird, dark boundary between adjacent bright colors.
Yuk! In the real world, out of focus colors blend smoothly, going from red to yellow to
green – not red to brown to green! This color blending problem isn’t limited
to digital photo blurring, either – pretty much any time a computer blurs an image or
tries to use transparent edges, you’ll see the same hideous sludge. There’s a very simple explanation for this
ugliness – and a simple way to fix it. It all starts with how we perceive brightness. Human vision, like our hearing, works on a
relative, roughly logarithmic scale: this means that flipping from one light to two
changes the percieved brightness a TON more than going from a hundred and one to a hundred
and two, despite adding the same physical amount of light. Our eyes and brains are simply
better at detecting small differences in the absolute brightness of dark scenes, and bad
at detecting the same differences in bright scenes. Computers and digital image sensors, on the
other hand, detect brightness purely based on the number of photons hitting a photodetector
– so additional photons register the same increase in brightness regardless of the surrounding
scene. When a digital image is stored, the computer
records a brightness value for each colors – red, green and blue – at each point
of the image. Typically, zero represents zero brightness and one represents 100 percent
brightness. So 0.5 is half as bright as 1, right? NOPE. This color might LOOK like it’s
halfway between black and white, but that’s because of our logarithmic vision – in terms
of absolute physical brightness, it’s only one fifth as many photons as white. Even more
crazy, an image value of 0.25 has just one twentieth the photons of white! Digital imaging has a good reason for being
designed in this darker-than-the-numbers-suggest way: remember, human vision is better at detecting
small differences in the brightness of dark scenes, which software engineers took advantage
of as a way of saving disk space in the early days of digital imaging. The trick is simple: when a digital camera
captures an image, instead of storing the brightness values it gives, store their square
roots – this samples the gradations of dark colors with more data points and bright colors
with fewer data points, roughly imitating the characteristics of human vision. When
you need to display the image on a monitor, just square the brightness back to present
the colors properly. This is all well and good – until you decide
to modify the image file. Blurring, for example, is achieved by replacing each pixel with an
average of the colors of nearby pixels. Simple enough. But depending on whether you take
the average before or after the square-rooting gives different results!! And unfortunately,
the vast majority of computer software does this incorrectly. Like, if you want to blur a red and green
boundary, you’d expect the middle to be half red and half green. And most computers
attempt that by lazily averaging the brightness values of the image FILE, forgetting that
the actual brightness values were square-rooted by the camera for better data storage! So
the average ends up being too dark, precisely because an average of two square roots is
always less than the square root of an average. To correctly blend the red and green and avoid
the ugly dark sludge, the computer SHOULD have first squared each of the brightnesses
to undo the camera’s square rooting, then averaged them, and then squared-rooted it
back – look how much nicer it is!! Unfortunately, the vast majority of software,
ranging from iOS to instagram to the standard settings in Adobe Photoshop, takes the lazy,
ugly, and wrong approach to image brightness. And while there are advanced settings in photoshop
and other professional graphics software that let you use the mathematically and physically
correct blending, shouldn’t beauty just be the default?

100 comments on “Computer Color is Broken”

  1. wolol says:

    We understood this

  2. Zuorion says:

    As computer graphic that have to work with sRGB and linear color space images simultaneously i really wish that anarchic CRT dumb thing called sRGB would die -_-.

  3. Gryd says:

    soooo, how can i make it do it the right way in photoshop?

  4. theartofshwa says:

    3:20 – I just tried this in Photoshop and it didn't work at all. wtfx?

  5. Az Antifizikus says:

    fifty shades of grey

  6. Huggggs says:

    Well art software developers… there’s no excuse now

  7. The Werewolf says:

    Fortunately, Windows and Linux must get it right since ALL the samples in the video were iOS or Mac based. Pity, I thought Apple was all about getting it right.

  8. Airwreck 14 says:

    All these companies should be taking notes

  9. _*.•TriAnimations•.*_ says:

    ibisPaint X doesn’t do this :3

  10. Ahmet Bilal says:

    4:14 AKP ?

  11. Glitchy The Noob says:

    The only thing I understood is that Apple is lazy

  12. Cad3n 123 says:

    how do i make a software that does this

  13. Mushroom_hunter says:

    Even einstein would be confused when watching this

  14. shoot991 says:

    Where are these magical settings for photoshop?

  15. 3TimeRises says:

    about the audible audiobook. If you already have an audible account you cannot get this audiobook for free anymore, right? If I am wrong and am able to receive the free audiobook, could somebody tell me what I have to do? thanks

  16. Gergus Friggs says:

    It increases the computational complexity of a blur massively if you have to do a square root and two squares though.

  17. G3E007 says:

    i expected a deathcore song…

  18. Luck says:

    Wow, I never heard about it! Even though I am pretty advanced in computer vision (did vSLAM diploma project, and almost got a computer vision engineer position).

  19. Macintoshiba says:

    Fix your sound please. I can hear Main's Hum.

  20. Aleksandra Skaper says:

    It's a shadow.

  21. Ryan Hickey says:

    Way to go Henry! Great analysis.

  22. Doctor_Whoey says:

    K
    But how do i change the settings to use that formula instead

  23. i like kittydog says:

    One question…

    Are colors broken on phone too?

  24. santiago fino says:

    Holy shit that bass tone is so good

  25. Mark DiVelbiss says:

    WHY DIDN'T I KNOW THIS
    I can unironically say this would have made some projects I've toyed withe such as cell shading and such WAAAAAY easier had I known.

  26. Mark DiVelbiss says:

    WHY DIDN'T I KNOW THIS
    I can unironically say this would have made some projects I've toyed withe such as cell shading and such WAAAAAY easier had I known.

  27. Joshua Lamusga says:

    Thanks for explaining gamma in a way that doesn't make my brain crust over. I enjoy graphics algorithms and the Gaussian blur issue here is very useful to know!

  28. Guilherme Ferreira says:

    He just ignores anything other than apple exists

  29. Guilherme Ferreira says:

    I laugh as i see this cuz when sliding down the notification panel in android it blends the colours fantastically… while macbooks still are shit at it

  30. pls forgibe me senpai says:

    Eat my ass

  31. Caption Police says:

    youtube at 12 am on a saturday: youve heard of math with letters?? what about math with COLORS

  32. Tootsie says:

    I've never heard a video so angry sounding yet so cordial at the same time

  33. 3oF / Tpelaaja says:

    I dont understand…..

  34. Thomas Synths says:

    Use something like CIELUV instead of trying to 'fix' RGB.

  35. Potato Girl says:

    I'm too retarded to understand most of this

  36. Tvde1 says:

    Better title: some developers made bad code

  37. scott web says:

    Software engineers hate this guy!,

  38. Henrich Achberger says:

    btw its called linear workflow to do things correctly

  39. dlwatib says:

    More programmers would get this right if we knew that the image values had been square rooted. But that information is not readily available. This is the first I've ever heard of it.

    BTW: The square root function exaggerates human sensitivities. That is to say, dark computer-generated colors are practically indistinguishable, so about a quarter of the computer color gamut is essentially unusable, and light color gradations are too coarse IMHO.

  40. Lewis Elvin says:

    1/5 is 20% not 22% 1:30

  41. Monkeyking says:

    ……. so what does it mean if i see that brown/black border in real life?

  42. SandboxArrow says:

    Why does this video even exist?

  43. Iana A. says:

    Why am I here

  44. Virginia Brat says:

    Thank you! I need this knowledge. Hope I'll remember how to do it when the time comes.

  45. Scott Hammond says:

    looks like GIMP does it right

  46. Ash Wolford says:

    Note: the PS setting he displays in this video does not solve this problem for anything other than blended layers. If you want the blur filters to look right, you need to switch the image into 32-bit color mode (Image->Mode->32 Bits/channel). Note that this disables many features within photoshop, so if you need to use certain adjustment layers, etc, you may have to perform the edits in a smart layer (which can be in a different color mode). Edit: I hear Lab mode works for this as well.

  47. Luny Cipres says:

    Sooo it doesn't happen in my phone cuz the software does it the correct way?

    I mean I've never seen a failed blur before

  48. Peter D Morrison says:

    That's why professional photographers always use "raw" image format. It preserves colour and brightness information correctly.

  49. Jari Haukilahti says:

    So the current cameras lies about the colours -so how is merging Ais gonna know that humans use lies to see information???

  50. Jad Issa says:

    If we see logarithmically, then why did they choose the square root instead of the logarithm?

  51. Thomas Kundera says:

    I once wanted to use my camera to do some measures, and I checked the linearity of the captor by taking pictures of the very same light scene (my computer screen with a white image, if I remember well), changing just the exposure time. And that was very linear.
    But I used the RAW files, not the jpeg.
    Is this encoding relative to jpeg only?

  52. Bloody Mobile says:

    I find it hilarious that the "king" of image editing software Photoshop does this wrong xD

  53. Hamat Calderon says:

    You just ruined my adobe photoshop experience and set me back years now i have to change my settings 😭

  54. Victor Skyba says:

    so you just take RAW image with no compression to jpeg and you edit it and it suppose to have better colout blending ?

  55. Знайозавър says:

    AWESOME!!!

  56. K Y says:

    Am I the only one who doesn't understand anything ?

  57. M 3 says:

    This has never happened to my Mac… U crazy bitch must be using windows or other shitty OS like android… smh…

  58. Nikolay Yakimov says:

    "in real life colors blend smoothly", he says, while showing lens blur with visible dark smudge between adjacent brightly-colored rectangles. Srsly m8?

  59. Aaaa Haelp says:

    As someone who loves Photoshop, thank you for showing the setting to fix this

  60. Kaylee Fisher says:

    I LITERALLY NEVER KNEW THIS O_O ❤

  61. V King says:

    da fuck

  62. Yoshi says:

    The solution is so easy, why doesn't literally everything use it.

  63. Michele Ceccarelli says:

    It may be a stupid question but… isn't it sufficient to shoot in raw?

  64. O H says:

    I'm guessing processing power (and time).

  65. MIMIK says:

    I have to use this in one of my programming projects!

  66. Lizard King says:

    i'll have to remember this when mixing colours 😀

  67. Katgirldiamond says:

    I just checked my digital art program, it doesn't have this proble… yey

  68. Mike Tyshchenko says:

    what does 2 mean

  69. veizour says:

    Wow, never knew. Good lesson!

  70. Faisal Hakim says:

    the computer colour is not broken, our eyes are.

  71. GD IzzyConfusing says:

    010101 in hexadecimal with RBG units actually reed 99.77897% Black, and not pure white!

  72. Curtis Newton says:

    who cares
    why the fuck does this…ugh why do I even bother

  73. Boss Bunny says:

    It's funny how stupid mathematicians are… adding ONE light to TWO means everything got 100% brighter, whereas adding ONE to (for example) NINETY NINE, things only got 1% brighter…

  74. FiNNiK says:

    Funfact: paint.net does exactly that. It blurs the way it should instead of how other programs do it.

  75. Zen Trader says:

    Bad example at the begining, 2 light bulbs are twice as bright as one, whereas 102 lightbulbs are less than a hundredth brighter than 101.

  76. Lime Diamond says:

    I have an OC a that had blended colors and I hate it

  77. ThatReallyHotGirl says:

    when you learn more of a minute video than hours of school

    edit: oops i meant 4 minutes

  78. dorbie says:

    Is it broken, is it just incompetent graphics coders? Blending and other arithmetic should happen in display linear space. I wrote a Dr. Dobb's journal article (dead tree publication) on this in 1999, and it wasn't original then. 2 decades later the same mistakes are being made.

  79. Yellowish Emi says:

    How to outsmart you're art teacher

  80. rj says:

    basically, humans are very lazy

  81. Baumus77 says:

    ahem! blending..

  82. Priya Creates says:

    Every digital artist's lifesaving video

  83. HunterBoy 74144 says:

    Don’t you mean, “Printer Color?”

  84. Krasen Makes Content says:

    Paint.NET has this with unfocus.

  85. Limek says:

    y does your logo look like a gravestone

  86. RainingArtillery says:

    the problem is that squaring is very computationally demanding.

  87. Abdullah Hamad says:

    You're wrong. It's your VGA color palette. Some computers have brown instead of orange, throwing off any art produced on the machine. There are usually four or 16 colors produced by a VGA emulator on modern PCs, and one or two of them might be off. You can alter your VGA color palette in the Control Panel, or, sometimes, in the BIOS (On a P.O.S. Dell).

  88. Documenter without any original content says:

    This is not a rainbow
    V V V V V V V V V V
    🏳️‍🌈🏳️‍🌈🏳️‍🌈🏳️‍🌈🏳️‍🌈🏳️‍🌈🏳️‍🌈

    It's an LGBTQ+ flag

    I say these because of your "this is not a rainbow" video

  89. LuaConstructor says:

    I don't like how much apple product placement is in this video.

  90. Isaac Benavidez says:

    English please

  91. Nexos XV says:

    But the stickman would need his own eyes to know where to point the big eye!

  92. Drift11 says:

    when i blur images like that on my pc it appears as in real life

  93. __0_ says:

    Colorblind: What is the difference?

  94. SilentWraith41 MC says:

    1:45 invert your screen colors and u can read the text

  95. pastrelle says:

    i think 6 of my braincells die each second i watch this video

  96. Average Weirdo says:

    I didn’t know math could be beautiful

  97. Hugs and Kisses With a cherrie on top says:

    …wait… did you actually understand this?

  98. Benjamin McLean says:

    "Shouldn't beauty just be the default?" — Depends on how much we care about performance. Squaring and square rooting every single pixel can be computationally expensive.

  99. ZaelHaelAway says:

    You got my sub!

  100. Fury Gamer says:

    At the start the blurry stuff mad every thing around me blurry does that mean my eyes are bad

Leave a Reply

Your email address will not be published. Required fields are marked *