Do you ever wonder about the magic number 255 you see all over Photoshop and even in Lightroom Classic if you look? It seems like 255 pops up everywhere. Why is that? It is a strange number to choose.
It’s just a number
First let me say that at this point in time, 255 is just a number without meaning. It is the number chosen to represent the maximum value of a channel or color. Something has to be used to represent the maximum value. Looking back, 100 (as in 100%) would have probably made more sense. But we have 255.
Think of it like Fahrenheit and Centigrade scales. The boiling point of water is 212 in Fahrenheit and 100 in Centigrade. Either way, it represents the same thing, the boiling point of water. That does not change no matter how the number is represented.
So when you see 255 just read it as the maximum value of that thing. If that is the level you wish to understand, this would be a good point to stop reading this article. 🙂
Personally I hope you continue. Understanding some of the history and details of our tools can only help improve our craft.
Roots in binary
Before we go deeper I need to justify where the number 255 comes from. It is rooted in binary coding. You are probably familiar with digital notations. We have lived with it for so long it seems to permeate everything around us.
Please pardon me for going full on Geek here. I so seldom get to use my training that it is fun. A very, very brief background: when digital computers were being developed, it was found to be simpler and more reliable to create circuits that were either on or off, no in between states. This was called a bit. A piece of data that was either off or on, noted as 0 or 1. The advantage of this seemingly silly decision is that the bits could be made very small and can be operated on very fast.
©Ed Schlotzhauer
A single bit by itself isn’t very valuable. To represent realistic information and do calculations bits were combined together in larger units. The next widely used unit was 8 bits. This came to be called a “byte”. Eight bits is a byte – Geek humor.
It turns out that 8 bits is enough to start encoding useful information. For instance, it will hold 1 character. A byte is big enough to code all the upper and lower case letters, punctuation, and some special symbols. At least in English. And we will see that it holds a useful amount of image data.
Let me give a very simple description of digital value coding using 3 bits:
Each combination of the 3 on/off values is assigned a value. The encoded values range from 0 to 7.
Going back to the unit we called a byte, the 8 bits can encode 256 values, 0 to 255. This is the origin of the magic 255.
History of Photoshop
It is hard to think that there was a “before Photoshop”. Thomas Knoll needed to develop ways of doing analysis on images for his PhD thesis. In those days, nothing was available, so he taught himself programming and developed a library of operations. Here is an interesting interview with Thomas.
His brother John worked for Industrial Light and Magic. He saw applications for image processing in some things they were doing, so he encouraged Thomas to enhance his library. Eventually they decided to try to make it a product. Adobe was interested. It is amazing how things come to be.
In the days when the library, later Photoshop, was developed, the state of the art of image representation was to code each pixel as 3 8 bit values. One byte each for red, green, and blue. Each color had the value range 0 to 255. This number scheme became baked in to Photoshop and a standard metaphor of the user interface.
©Ed Schlotzhauer
Today’s data
Early digital cameras shot 8 bit images. Today, though, images and Photoshop has grown well beyond that. As an example, my Nikon Z7 II captures 14 bit data. Each red, green and blue channel is 14 bits. That is 16384 values per channel instead of 256. Some other cameras have even more bit depth.
Photoshop allows us to select if we will treat our files as 8 bit or 16 bit or 32 bit. With all these variables it could impose a huge burden on the user to deal with the actual value range of the data he is editing. Some of these numbers get to be staggering (for 32 bit data each channel has 4,294,967,296 values). Adobe chose to keep the maximum number we see at 255. In effect, it became an arbitrary measuring scale we work with across the apps.
By the way, Lightroom uses 32 bit data internally. You do not get a choice. But even in Lightroom (Classic at least) the 255 illusion peaks through in one place. Look at the Tone Curve tool. The scale is 0 to 255.
Still, it’s just a number
Fahrenheit or Centigrade. It is just an arbitrary number to represent the same thing, the boiling point of water. Adobe has kept that historical number 255 and given it the implied meaning of “maximum”. It no longer has a tie to the actual size of the data you are editing or the maximum value of an 8 bit chunk of data.
©Ed Schlotzhauer
They have done us a service in this. I would hate to think of the mental complexity I would have to go through if this number changed all over the place to be the actual values I am working with. But a simplification comes with some challenges. People tend to forget why the simplification was made. Even that one was made at all.
When you are using the curves tool and other things, freely accept 255 as meaning “maximum”. Do not forget and think that your data only goes to 255. Or that it has somehow discarded all those other wonderful bits our modern cameras give us. When someone tells you that white is 255/255/255 and seem to think that is the actual value of their data, remember that is just a number on a scale. Smile to yourself knowing you probably understand it at a deeper level than they do.
I don’t have many images in my catalog that are actually 8 bit data. I am very glad the technology has moved on in wonderful ways. And I am grateful for the simplified scale that normalizes what I see when I am working with all this data. Thank you Adobe. This is something you did right. It doesn’t matter what the number is, something had to be defined as a convenient value for “maximum”.
Today’s image
The image at the head of this is actually 8 bit. An 8 bit jpg file. All the data is actually 0 to 255. Back in 2006 that was about the best I could do with the camera I had. It’s not terrible. I like the image, but I wish I could shoot it again with a modern camera.
As a matter of fact, all the images in this article are 8 bit. I wanted to emphasize that it was a very workable system.
Side note
In today’s digital systems we seldom worry much about a few bytes. Every time I press the shutter on my camera it writes about 50 million bytes to my memory card.
I mentioned that digital bits could be made very small. As an example, Apple’s M4 processor, which is their main CPU as of this writing, has 28 Billion transistors. On one chip. That is hard to comprehend. It certainly wasn’t anticipated when Thomas Knoll developed Photoshop.