ToolNimba

๐ŸŒ— Darken and Lighten Color Tool

Shihab Mia By Shihab Mia ยท Updated 2026-07-07

-100% darker 0% original +100% lighter

Original

Adjusted

Scale (darker to lighter)

Pick a color and drag the slider. Click the adjusted swatch or any scale swatch to copy its hex.

To darken or lighten a color, this tool converts your hex code to HSL and shifts only the lightness: drag one slider from -100% (toward black) to +100% (toward white), and the hue and saturation stay locked so the color stays in the same family. Pick any color or type a hex, and you instantly get the adjusted swatch beside the original, the new hex code, and a full scale of evenly spaced darker shades and lighter tints you can copy with a click. It is the fastest way to build hover, active and disabled button states or a tint-and-shade palette from a single brand color, and everything runs in your browser with nothing uploaded.

What is the Darken or Lighten Color?

Darkening or lightening a color is easiest in the HSL model. HSL describes a color by hue (the angle on the color wheel, 0 to 360 degrees), saturation (how vivid it is, 0 to 100 percent) and lightness (how bright it is, where 0 percent is black, 50 percent is the pure color and 100 percent is white). To shift a color toward black or white while keeping it recognisably the same color, you change only the lightness and leave hue and saturation alone. That is exactly what this tool does, so the adjusted color stays in the same family rather than drifting to a different shade.

The slider runs from -100 percent to +100 percent. At 0 percent you get the original color back. A positive value moves lightness toward 100 percent (white): the new lightness is L + (100 - L) x amount, so +50 percent closes half the remaining gap to white. A negative value moves lightness toward 0 percent (black): the new lightness is L x (1 + amount), so -50 percent halves the lightness. Because the steps are proportional rather than fixed, the same percentage feels consistent whether you start from a dark or a light color, and you rarely need to touch the extremes for real UI work.

Working in HSL is why this gives cleaner results than simply scaling the raw red, green and blue numbers. Multiplying RGB channels can desaturate or skew the hue, especially near white, because a fixed factor drags each channel by a different visible amount. Converting to HSL, nudging only the lightness, then converting back keeps the hue locked, which is what you want when generating hover, active and disabled states or a tidy palette from one brand color.

There is an important distinction in the terminology. A tint is a color mixed toward white (a lighter version), and a shade is a color mixed toward black (a darker version). Designers often build a 9-step or 10-step ramp, for example 50, 100, 200 up to 900, from a single base color so that text, borders, backgrounds and hover states all come from one consistent scale. This tool makes that ramp visible at a glance: the step scale shows -100%, -75%, -50%, -25%, 0%, +25%, +50%, +75% and +100% side by side, so you can pick the two or three steps that read as a coherent set.

One caveat worth understanding is that sRGB, the color space hex codes live in, is not perceptually uniform. A change of, say, 20 lightness points near the middle of the range looks like a bigger jump than the same 20 points near black or white, and equal HSL steps can look slightly uneven to the eye. For pixel-accurate UI states this is close enough and universally supported. If you need perceptually even steps, newer CSS color spaces such as OKLCH space their lightness more evenly, but HSL remains the simplest, most compatible way to generate shades and tints.

Modern CSS also offers native ways to do the same job. The function color-mix(in srgb, #3B82F6, black 40%) produces a shade and color-mix(in srgb, #3B82F6, white 30%) produces a tint, and relative color syntax like hsl(from #3B82F6 h s calc(l - 15%)) lets you subtract lightness directly. These are handy when you want the browser to compute the variant live, but a static hex from this tool is still the most portable option, working in email, older browsers, design files and any place color-mix is not available.

When to use it

  • Creating a darker hover or active state for a button from its base brand color, for example -20% for hover and -35% for the pressed state.
  • Making a light tint of a color for a card background, badge, table stripe or subtle section fill without changing the hue.
  • Building a consistent set of shades and tints (a 50 to 900 ramp) for a UI palette from one starting color.
  • Deriving a lighter disabled state and a darker focus ring from a single accent color so the whole control set matches.
  • Adjusting a color that is slightly too bright or too dark for a background without shifting it to a different color.
  • Generating a darker border or drop-shadow tone that clearly reads as related to the fill it sits against.

How to use the Darken or Lighten Color

  1. Pick a color with the swatch picker, or type a hex code (with or without the #) into the HEX field.
  2. Drag the slider left to darken (toward -100%) or right to lighten (toward +100%).
  3. Read the resulting hex on the adjusted swatch and compare it with the original beside it.
  4. Use the step scale to see evenly spaced darker and lighter versions at once and choose a coherent pair or trio.
  5. Click the adjusted swatch or any scale swatch to copy its hex code to the clipboard.

Formula & method

Convert the color to HSL, then change only the lightness L (0 to 100). For a positive amount a (0 to 1): new L = L + (100 - L) x a. For a negative amount a (-1 to 0): new L = L x (1 + a). Clamp the result to 0 to 100, then convert HSL back to RGB and to a hex code. Hue and saturation are unchanged.
Darken to lighten scale for a blue colorDarken (left) to Lighten (right): same hue, only lightness changes-100%-50%-25%0%+25%+50%+75%+100%#000000#073C92#0A59DB#3B82F6#6CA1F8#9DC1FB#CEE0FD#FFFFFFBase color (hue 217, sat 91%)Shades keep the same hue and saturation; only HSL lightness moves toward black or white.

Worked examples

You want a darker version of #3B82F6 (a blue) at -40% for a button hover state.

  1. Convert #3B82F6 to HSL: hue 217, saturation 91%, lightness 59.8%.
  2. Amount = -40% = -0.4, which is negative, so use new L = L x (1 + a).
  3. New L = 59.8 x (1 + (-0.4)) = 59.8 x 0.6 = 35.9%.
  4. Keep hue 217 and saturation 91%, set lightness to 35.9%.
  5. Convert HSL(217, 91%, 35.9%) back to RGB and then to hex.

Result: #3B82F6 darkened 40% becomes #0847AF.

You want a lighter tint of #E11D48 (a pink-red) at +30% for a badge background.

  1. Convert #E11D48 to HSL: hue 347, saturation 77%, lightness 49.8%.
  2. Amount = +30% = 0.3, which is positive, so use new L = L + (100 - L) x a.
  3. New L = 49.8 + (100 - 49.8) x 0.3 = 49.8 + 50.2 x 0.3 = 49.8 + 15.1 = 64.9%.
  4. Keep hue 347 and saturation 77%, set lightness to 64.9%.
  5. Convert HSL(347, 77%, 64.9%) back to RGB and then to hex.

Result: #E11D48 lightened 30% becomes #EB607F.

You want a subtle -15% shade of a neutral gray #6B7280 for a card border.

  1. Convert #6B7280 to HSL: hue 220, saturation 9%, lightness 46.5%.
  2. Amount = -15% = -0.15, which is negative, so use new L = L x (1 + a).
  3. New L = 46.5 x (1 + (-0.15)) = 46.5 x 0.85 = 39.5%.
  4. Keep hue 220 and saturation 9%, set lightness to 39.5%.
  5. Convert HSL(220, 9%, 39.5%) back to RGB and then to hex.

Result: #6B7280 darkened 15% becomes #5B616B, a border that clearly relates to the fill.

Step scale for #3B82F6 (hue 217, saturation 91%, lightness 59.8%) across the slider

AdjustmentEffectResulting hex
-100%Black#000000
-75%Much darker#031E49
-50%Darker#073C92
-25%Slightly darker#0A59DB
0%Original#3B82F6
+25%Slightly lighter#6CA1F8
+50%Lighter#9DC1FB
+75%Much lighter#CEE0FD
+100%White#FFFFFF

How the lightness formula maps a few amounts (starting from lightness L = 50%)

AmountFormula usedNew lightness
-100%50 x (1 + (-1))0% (black)
-50%50 x (1 + (-0.5))25%
0%unchanged50%
+50%50 + (100 - 50) x 0.575%
+100%50 + (100 - 50) x 1100% (white)

Ways to darken or lighten a color, and when to reach for each

MethodHow it worksBest for
HSL lightness (this tool)Change only L, keep H and SPortable static hex for any project
color-mix() in CSSMix your color with black or white by a percentageLive variants computed by the browser
Relative color hsl(from ...)Subtract or add to the lightness channel in CSSDeriving states from a CSS variable
Scaling RGB channelsMultiply R, G and B by a factorQuick and rough, but can skew hue
OKLCH lightnessAdjust L in a perceptual color spacePerceptually even ramps in modern browsers

Common mistakes to avoid

  • Scaling the RGB numbers directly instead of the lightness. Multiplying each of red, green and blue by the same factor can shift the hue and wash out saturation, especially near white. Adjusting only the lightness in HSL keeps the color in the same family, which is why this tool converts to HSL first.
  • Expecting -100% and +100% to be subtle. The extremes are absolute: -100% always gives pure black and +100% always gives pure white, whatever color you start from. For usable hover and tint states, smaller steps like 10% to 40% are usually what you want.
  • Assuming the same percentage looks identical on every color. Because the change is proportional to the current lightness, a -30% step on an already dark color moves fewer points than the same step on a bright one. Compare colors by their resulting lightness, not just the slider value.
  • Darkening a fully saturated color and expecting it to stay vivid. Lowering lightness toward black naturally mutes a color, and raising it toward white fades it. If you need to keep vividness while changing brightness, adjust saturation separately rather than relying on lightness alone.
  • Confusing a tint with a shade. A tint is lighter (mixed toward white) and a shade is darker (mixed toward black). If a hover state looks wrong, check the sign of your slider: buttons usually want a shade (negative) on hover, not a tint.
  • Ignoring contrast when lightening text or dark buttons. Lightening a text color or darkening a light button can quietly break readability. After adjusting, check the pair against a contrast target such as WCAG 4.5:1 for normal text, because HSL lightness is not the same as measured contrast.

Glossary

HSL
A color model describing a color by hue, saturation and lightness, which makes lightness easy to adjust on its own.
Hue
The position of a color on the color wheel, measured in degrees from 0 to 360 (0 red, 120 green, 240 blue).
Saturation
How vivid or gray a color is, from 0 percent (gray) to 100 percent (fully colorful).
Lightness
How bright a color is in HSL, from 0 percent (black) through the pure color at 50 percent to 100 percent (white).
Tint
A lighter version of a color, produced by moving its lightness toward white.
Shade
A darker version of a color, produced by moving its lightness toward black.
Hex code
A six-character string like #3B82F6 that encodes the red, green and blue channels of a color in base 16.
color-mix()
A CSS function that blends two colors by a percentage, for example mixing a color with black to make a shade.

Frequently asked questions

How do I darken or lighten a color?

Enter your hex code, then drag the slider: left of 0% darkens the color toward black and right of 0% lightens it toward white. The tool converts the color to HSL, changes only the lightness while keeping the hue and saturation fixed, and shows the new hex you can copy. This keeps the result in the same color family instead of shifting to a different hue.

What do -100% and +100% mean on the slider?

At 0% you get your original color. -100% pushes the lightness all the way to 0%, which is pure black, and +100% pushes it to 100%, which is pure white. Values in between blend proportionally, so most real UI use cases sit in the -40% to +40% range.

Why adjust lightness in HSL instead of scaling RGB?

Scaling the raw red, green and blue numbers can change the hue and reduce saturation, giving muddy or washed-out results. Adjusting lightness in HSL changes only how bright the color is, so the underlying color stays recognisable, which is what you want for hover states and tints.

What is the difference between a tint and a shade?

A tint is a lighter version of a color, made by moving its lightness toward white. A shade is a darker version, made by moving its lightness toward black. Both keep the same hue, so a tint and a shade of the same base color still read as the same color, just brighter or darker.

How do I make a button hover color?

Take your base button color and darken it by roughly 10% to 20% for the hover state, then a little more (around 25% to 35%) for the active or pressed state. Enter the base hex, drag the slider to a small negative value, and copy the resulting shade. Using consistent negative steps keeps the whole control set looking related.

Can I type a hex code instead of using the picker?

Yes. Type any 6-digit or 3-digit hex code into the HEX field, with or without the leading #. The swatch picker and all the swatches update as you type, and an invalid value shows a short hint instead of breaking.

How do I build a full palette of shades and tints from one color?

Read the step scale, which shows -100% through +100% at once. Pick a few evenly spaced steps, for example -50%, -25%, 0%, +25% and +50%, and copy each hex. That gives you a coherent ramp of darker shades and lighter tints all derived from the same base color.

Is this the same as the CSS color-mix() function?

It achieves the same visual result. color-mix(in srgb, yourcolor, black 40%) makes a shade and color-mix(in srgb, yourcolor, white 40%) makes a tint. This tool gives you a static hex instead, which is more portable: it works in email, older browsers and design files where color-mix may not be supported.

How do I copy the adjusted color?

Click the adjusted swatch to copy its hex code to your clipboard, or click any swatch in the step scale to copy that specific shade or tint. A short confirmation message appears once the value is copied.

Does my color data leave my device?

No. The tool runs entirely in your browser using plain JavaScript. Nothing you enter is uploaded or stored on a server, and it works offline once the page has loaded.

Sources