DIY Photography

Hacking Photography - one Picture at a time

  • News
  • Inspiration
  • Reviews
  • Tutorials
  • DIY
  • Gear
Search

Submit A Story

This video will help you make sense of HEX color codes

Oct 2, 2017 by Dunja Djudjic 5 Comments

  • Share
  • Tweet
  • Flipboard
  • WhatsApp

Have you ever wondered about the logic behind HEX color codes? Nathaniel Dodson of tutvid has created a great video to help you make sense of those seemingly illogical strings of letters and numbers.

The video makes HEX code look simple, and you don’t need to be a math genius to understand it. Even I was able to make sense of the digits, and I’m not good at math at all. When you figure out the pattern, you’ll be able to guess the color only by “reading” its HEX code.

Let’s start with the monitor, which mixes three channels to create colors:  red, green and blue. Each of the channels has 256 “slots,” ranging from 0 to 255, and 0 counting as one of the digits. When all three channels are completely full, you get the bright white. When all of them are completely empty and set to 0, you get the darkest possible color: black.

Following this logic, when the red channel is set to 256 and the green and the blue one are set to 0, you get the brightest color red. The same goes for green and blue. Mixing the values gives you a myriad of different colors, and the HEX code is there to show how much of each channel is in a certain color.

Breaking down the HEX code

Each HEX code consists of three parts, each of them containing two characters. The first two characters represent the red channel, the middle two are the green channel, and the last two are the blue channel.

The HEX numbers use 16 digits because to get any number between 0 and 255 you need a formula that needs 256 numbers, so the maximum value is 16×16. Since you can’t insert three or four numbers where you only have two digits, this is why HEX code uses letters to mark the numbers from 10 to 15:

Remember that we work with a 0 as a digit, so this in total gives 16 digits.

The formula

If all the channels are “empty” and we have the darkest color (black), #000000 is its code. On the other hand, for white, the code will be the highest possible value, which is #FFFFFF. Nathaniel breaks down the HEX code for the color white.

So, if you have six characters, every pair of them will mark a different channel. And since F stands for 15, this will be three pairs of 15 in a row.

When you break these pairs down, look at it this way: the first character of each pair is the “big number.” You take the big number and multiply it with 16.

The second character of each pair is the “small number,” and you multiply it with 1. Or basically, you leave it as is.

Finally, you add these two numbers together, and it gives you the amount of color in each channel, going from 0 to 255.

It takes a bit of time to get used to the formula, but after some practice, you’ll be able to guess the color from the HEX code. You can practice and test it out here, it’s the test Nathaniel uses in the video.

[HEX CODE for Dummies (The Non-Technical Guide) (Base-16) | Tutvid]

FIND THIS INTERESTING? SHARE IT WITH YOUR FRIENDS!

  • Share
  • Tweet
  • Flipboard
  • WhatsApp

Related posts:

Use Color Burn and Color Dodge to quickly add color and contrast to your photos This video shows how a sense of taste can inspire photography Making Sense of Your Flash’s Guide Number Making sense of aperture, shutter speed and ISO with the exposure triangle

Filed Under: Tutorials Tagged With: color, HEX code, HEX color code, Nathaniel Dodson, Tutvid

About Dunja Djudjic

Dunja Djudjic is a multi-talented artist based in Novi Sad, Serbia. With 15 years of experience as a photographer, she specializes in capturing the beauty of nature, travel, and fine art. In addition to her photography, Dunja also expresses her creativity through writing, embroidery, and jewelry making.

« 5 best 50mm lenses for under $100
How to fight creative jealousy… and get back to work »

Submit A Story

Get our FREE Lighting Book

DIYP lighting book cover

* download requires newsletter signup
DIYPhotography

Recent Comments

Free Resources

Advanced lighting book

Recent Posts

  • Sony teases upcoming ZV-E1 full-frame vlogging camera coming on March 29
  • The Xencelabs Pen Display 24 is silent, glare-free retouching tablet
  • Fall in love with astrophotography with these 10 space objects
  • Hipstamatic app relaunches as a social network, but only for iOS
  • Instagram now has ads even in search results. Sigh

Alex Baker is a portrait and lifestyle driven photographer based in Valencia, Spain. She works on a range of projects from commercial to fine art and has had work featured in publications such as The Daily Mail, Conde Nast Traveller and El Mundo, and has exhibited work across Europe

Dave Williams is an accomplished travel photographer, writer, and best-selling author from the UK. He is also a photography educator and published Aurora expert. Dave has traveled extensively in recent years, capturing stunning images from around the world in a modified van. His work has been featured in various publications and he has worked with notable brands such as Skoda, EE, Boeing, Huawei, Microsoft, BMW, Conde Nast, Electronic Arts, Discovery, BBC, The Guardian, ESPN, NBC, and many others.

John Aldred is a photographer with over 20 years of experience in the portrait and commercial worlds. He is based in Scotland and has been an early adopter - and occasional beta tester - of almost every digital imaging technology in that time. As well as his creative visual work, John uses 3D printing, electronics and programming to create his own photography and filmmaking tools and consults for a number of brands across the industry.

Dunja Djudjic is a multi-talented artist based in Novi Sad, Serbia. With 15 years of experience as a photographer, she specializes in capturing the beauty of nature, travel, and fine art. In addition to her photography, Dunja also expresses her creativity through writing, embroidery, and jewelry making.

Copyright © DIYPhotography 2006 - 2023 | About | Contact | Advertise | Write for DIYP | Full Disclosure | Privacy Policy