COLOR BRIGHTNESS GUIDE
Color Brightness Calculator – Check If a Color Is Light or Dark, Online and Free
Wondering how bright a color really is, or whether a color counts as light or dark? Our color brightness calculator online measures the brightness of any color from its HEX code or RGB values and shows the answer in seconds. There is no signup, no software to install and no watermark. Type a color or use the color picker, and the tool instantly calculates its perceived brightness, relative luminance, CIELAB lightness, HSP brightness, HSL lightness and HSV value, tells you if the color is light or dark, and recommends whether black or white text is easier to read on top of it. It works as a hex color brightness calculator, an RGB brightness calculator, a luminance calculator, a light or dark color checker and a contrast ratio checker, all on one page and on any device.
Brightness matters more than most people expect. It decides whether the text on your button is readable, whether a banner looks heavy or airy, whether a chart is easy to scan, and whether your website passes accessibility checks. Two colors can look equally vivid but differ a lot in brightness, and our eyes notice brightness differences before they notice hue differences. A reliable color brightness calculator removes the guesswork, so you can choose text colors, backgrounds, gradients and dark mode palettes with confidence instead of trial and error.
%
Perceived Brightness Calculator
Get the perceived brightness of any color on a scale from 0 to 255 and as a percentage. The calculator uses the weighted formula recommended by the W3C, which gives green the most weight and blue the least, because that is how human vision actually works. It is the number most designers and developers mean when they ask how bright a color is.
L
Luminance and Lightness Calculator
See WCAG relative luminance, CIELAB lightness (L*), HSP brightness, HSL lightness and HSV value side by side. Each method answers a slightly different question, and comparing them helps you understand why two colors with the same RGB average can look completely different in brightness.
Aa
Light or Dark Color Checker
Find out if a color is light or dark and whether black or white text is the better choice on top of it. Switch to compare mode to test a real text and background pair and see the contrast ratio, the W3C brightness and color difference, and the WCAG AA and AAA results.
What Is Color Brightness?
Color brightness describes how light or dark a color appears to the human eye. A pale yellow looks very bright, a navy blue looks dark, and a pure red sits somewhere in between. Brightness is not the same as how colorful or saturated a color is. A vivid, fully saturated blue can be much darker than a dull, grayish yellow. That is why a good brightness calculator needs to do more than average the red, green and blue values: it has to account for how strongly the eye responds to each of the three colors.
Human vision is most sensitive to green light, moderately sensitive to red and least sensitive to blue. A screen mixes red, green and blue light to make every color, so the brightness we perceive is a weighted sum of the three channels. This is the reason pure green (#00FF00) looks far brighter than pure blue (#0000FF), even though both have a channel value of 255. Every serious brightness formula, from the W3C perceived brightness to WCAG relative luminance, is built on this weighting.
It also helps to separate color brightness from screen brightness. Screen brightness is a hardware setting measured in nits that controls how much light your display emits. Color brightness, the subject of this calculator, is a property of the color value itself, and it stays the same whether you view it on a phone, a laptop or a television. When designers say a color is light or dark, they mean the color value, not the display setting.
How to Use the Color Brightness Calculator (Step by Step)
Checking the brightness of a color takes only a few seconds, and you can test as many colors as you like. You do not need design experience or an account. Follow these steps to find the brightness of a color from its HEX or RGB value.
-
Enter your color: Click the color swatch to open the picker, type a HEX code such as #2196F3, or paste an RGB value such as rgb(33, 150, 243). Press Random color to explore.
-
Read the brightness result: See the perceived brightness as a number from 0 to 255 and as a percentage, with a meter that shows where the color sits between black and white.
-
Check light or dark: The verdict tells you if the color is very dark, dark, light or very light, and which text color gives the best contrast.
-
Compare two colors if needed: Switch to Compare two, enter a background color and a text color, and see the contrast ratio and the WCAG results.
-
Copy the results: Click Copy results to save every value as plain text for your notes, a design file or a bug report.
The results update live as you type or drag the picker, which makes it easy to nudge a color lighter or darker until the numbers match the target you need.
Color Brightness Formulas Explained: Which Method Should You Use?
There is no single official definition of color brightness. Different industries use different formulas, and each one is useful for a different job. This calculator shows the most important methods side by side so you can pick the one that suits your project. The table below summarises what each method measures and where it works best.
Color brightness and lightness methods compared
| Method |
Formula |
Range |
Best for |
| Perceived brightness (W3C) |
(299 × R + 587 × G + 114 × B) / 1000 |
0 to 255 |
Quick light or dark checks, brightness difference between two colors |
| HSP brightness |
Square root of (0.299 × R² + 0.587 × G² + 0.114 × B²) |
0 to 255 |
A smoother perceived brightness estimate for sorting and grouping colors |
| Relative luminance (WCAG) |
0.2126 × R + 0.7152 × G + 0.0722 × B, using linear light |
0 to 1 |
Contrast ratios and accessibility checks |
| CIELAB lightness (L*) |
Derived from relative luminance |
0 to 100 |
Perceptually even lightness steps, tonal palettes |
| HSL lightness |
(max + min) / 2 |
0% to 100% |
Making colors lighter or darker in CSS, not measuring true brightness |
| HSV value |
max(R, G, B) / 255 |
0% to 100% |
Color pickers and image editing tools |
| Simple average |
(R + G + B) / 3 |
0 to 255 |
Rough estimates only, because it ignores how the eye works |
For most everyday tasks, the W3C perceived brightness is a fast and reliable answer to how bright a color is. For anything related to accessibility, such as checking text readability, relative luminance and the contrast ratio built from it are the standard. For design work that needs evenly spaced light and dark steps, such as building a tonal palette, CIELAB lightness is the best fit. HSL lightness and HSV value are useful for editing colors, but they are not good measures of how bright a color looks, and the next section shows why.
Why Pure Green Looks Brighter Than Pure Blue
A common surprise is that colors with the same HSL lightness or the same maximum channel value can have very different brightness. In HSL, pure red, pure green and pure blue all have a lightness of 50 percent, and in HSV they all have a value of 100 percent, yet no one would say they look equally bright. Blue looks deep and dark, while green and yellow look luminous. The table below shows the perceived brightness and relative luminance of some familiar colors, calculated with the same formulas as the tool above.
Brightness of common colors
| Color |
HEX |
Perceived brightness (W3C) |
Relative luminance |
Verdict |
| Black |
#000000 |
0% |
0.000 |
Very dark |
| Blue |
#0000FF |
11% |
0.072 |
Dark |
| Red |
#FF0000 |
30% |
0.213 |
Light |
| Magenta |
#FF00FF |
41% |
0.285 |
Light |
| Gray |
#808080 |
50% |
0.216 |
Light |
| Green (lime) |
#00FF00 |
59% |
0.715 |
Very light |
| Cyan |
#00FFFF |
70% |
0.787 |
Very light |
| Yellow |
#FFFF00 |
89% |
0.928 |
Very light |
| White |
#FFFFFF |
100% |
1.000 |
Very light |
The numbers confirm what your eyes already tell you: yellow is nearly as bright as white, green is much brighter than red, and blue is by far the darkest of the pure colors. This is why a yellow button needs dark text, a blue button usually works with white text, and why simply averaging the red, green and blue channels is not a trustworthy way to judge brightness.
How to Tell If a Color Is Light or Dark
The most useful way to define a light or dark color is to ask a practical question: which text color is easier to read on top of it? Black text has the better contrast on light colors, and white text has the better contrast on dark colors. The point where black and white text give exactly the same contrast is at a relative luminance of about 0.179. Colors above that value are light, because black text reads better on them, and colors below it are dark, because white text reads better. This calculator uses that crossover point for its verdict and further splits the result into very dark, dark, light and very light.
How the light or dark verdict works
| Verdict |
Relative luminance |
Better text color |
| Very dark |
Below 0.03 |
White |
| Dark |
0.03 to 0.179 |
White |
| Light |
0.179 to 0.5 |
Black |
| Very light |
0.5 and above |
Black |
You may have seen a simpler rule that calls a color light when its perceived brightness is above 128 out of 255, or 50 percent. That rule is quick, but it is not tuned to the contrast ratio, so it can disagree with this verdict for mid-tone colors. A good example is the classic material blue #2196F3. Its perceived brightness is about 49 percent, which looks dark under the simple rule, yet black text gives it a higher contrast ratio than white text. In cases like this, trust the contrast ratios shown in the results, because they are the numbers that accessibility guidelines actually use.
Mid-tone colors are the tricky zone. When neither black nor white text reaches a comfortable contrast, the best fix is to adjust the background: make it clearly lighter or clearly darker. The results panel shows the contrast ratio for both black and white text on your color, so you can see exactly how much room you have before you change anything.
Brightness Difference, Color Difference and WCAG Contrast Ratio
When you switch the calculator to compare mode, it checks a text and background pair with three separate tests. The first two come from the W3C accessibility techniques. The brightness difference is the absolute difference between the perceived brightness of the two colors, and the guideline asks for a difference of at least 125. The color difference is the sum of the absolute differences between the red, green and blue channels, and the guideline asks for at least 500. Both tests are quick and easy to calculate, and they are still widely used in color accessibility tools.
The third test is the WCAG contrast ratio, which is the standard used in modern accessibility audits. It is calculated from the relative luminance of both colors and ranges from 1 to 1 for identical colors up to 21 to 1 for black on white. The table below lists the targets defined by the Web Content Accessibility Guidelines.
WCAG contrast ratio targets
| Level |
Minimum ratio |
Applies to |
| AA, normal text |
4.5 to 1 |
Body text and small text |
| AA, large text |
3 to 1 |
Large headings, bold labels and key interface components such as icons and input borders |
| AAA, normal text |
7 to 1 |
The enhanced level, for the highest readability |
A pair can pass one test and fail another, which is why the compare mode shows them all. As a rule of thumb, aim for the WCAG ratio first, because it is the one that auditors, laws and accessibility standards refer to, and use the brightness and color difference as quick secondary checks.
Common Uses: Why Use a Color Brightness Calculator?
A brightness calculator is a small tool that solves many everyday design and development problems. Here are some of the most common uses.
- Choose readable text colors: Decide whether buttons, banners, badges and cards need black or white text.
- Build dark mode and light mode themes: Check that your colors have a clear brightness gap between backgrounds, surfaces and text.
- Audit website accessibility: Verify WCAG AA and AAA contrast for brand colors before launch or during a review.
- Create gradients and overlays: Make sure text placed over a gradient or image overlay stays readable from end to end.
- Design charts and data visualizations: Use brightness to build ordered color scales where darker means more.
- Sort and group colors: Arrange a palette from darkest to lightest, or pick the lightest and darkest swatch in a set.
- Teach color theory: Show students how the eye weights red, green and blue differently using real numbers.
- Write code that adapts to color: Prototype the formula you will use to pick text colors automatically in an app or script.
Color Brightness Calculator for Developers: Formula and Code
Many apps need to pick a readable text color automatically, for example when users choose their own label colors, avatars, tags or theme colors. The simplest approach is to calculate the perceived brightness and compare it with a threshold. Here is the W3C formula as a short JavaScript function that you can adapt to any language:
function brightness(r, g, b) {
return (r * 299 + g * 587 + b * 114) / 1000;
}
// 0 = black, 255 = white
// brightness(33, 150, 243) is about 125.6
This works well for quick decisions, but for the best results, calculate WCAG relative luminance and choose the text color with the higher contrast ratio. That is the method this calculator uses for its recommendation, and it avoids the mid-tone problem described above. In CSS, you can also keep colors in a form that is easy to adjust, such as HSL or the newer relative color syntax, and use this calculator to check the final values.
- Test your thresholds: Run a few edge-case colors through the calculator before you ship a rule that picks text colors automatically.
- Prefer contrast ratios for accessibility: A brightness threshold is a shortcut, while the contrast ratio is the real requirement.
- Handle alpha separately: Semi-transparent colors take on the brightness of what is behind them, so flatten them against the background first.
Color Brightness for Designers: Palettes, Branding and Mood
Designers use brightness to control mood and hierarchy. Bright colors draw the eye and feel energetic, light and friendly, while dark colors feel serious, calm, premium or dramatic. A balanced layout usually combines several brightness levels: a light background, a dark text color, a mid-tone for secondary elements and one bright accent for the most important action. If every color in a design has a similar brightness, the page feels flat, no matter how many different hues it uses.
A handy trick is to look at your design in grayscale. If you can still tell which elements are important and read all the text, your brightness structure is working. If areas blend together, the brightness values of those colors are too close. Use this calculator to compare the actual numbers instead of squinting at a screenshot: check your background, card, border, text and accent colors, and make sure the important pairs have a clear gap in brightness and a passing contrast ratio.
Common Mistakes When Judging Color Brightness
The most common mistake is trusting your eyes alone. Brightness perception changes with screen settings, ambient light and the colors around a swatch, so a color can look fine on your monitor and fail on a phone outdoors. Calculating the value gives you a stable, repeatable answer. A second mistake is using HSL lightness as a brightness measure. HSL lightness is handy for making a color lighter or darker, but it treats blue and yellow as equally light when they are not.
Another frequent error is forgetting about size and weight. A color pair that is acceptable for a large, bold heading can be too faint for small body text, and the WCAG targets reflect that with different ratios. Finally, do not ignore the state of your interface: hover, focus, disabled and selected states each use different colors, and each one needs enough contrast on its own. Check them all, not just the default state.
Check Color Brightness on Any Device, No Software Needed
Our online color brightness calculator runs in your web browser, so you can check the brightness of a color on Windows, Mac, Linux, Android and iPhone without installing an app or a browser extension. Whether you are looking for a hex color brightness calculator for your phone, an RGB brightness calculator for your PC or a light or dark color checker for your Mac, the steps are the same in every modern browser. Open the page, enter your color and read the results. There is no account to create, no watermark and no limit on how many colors you can test.
Because every value is calculated on your own device and not on a server, results appear instantly as you type, and the colors you enter are never uploaded or stored. Nothing is saved between visits, so use Copy results to keep any values you want.
Free Color Brightness Calculator Online: Fast, Accurate and Easy to Use
Our free color brightness calculator was built for designers, developers, students and anyone who needs a clear answer about a color. If you want a brightness tool with no signup, no watermark, live results, a light or dark verdict, contrast ratios and a WCAG check, this page gives you exactly that. Enter a color, read the numbers and choose your text color with confidence.
Ready to try it? Scroll back up, pick a color and see how bright it really is. If you also need to generate random colors or build a Material palette, explore the other free color tools on our site.