Hex to Material Design Color
Convert any hex color code to its closest Google Material Design 500-tier color, like Blue 500 or Red 500, using a weighted color-distance formula.

Built by
Swapnil SanghviFull-Stack Web Developer & WordPress Developer
Swapnil Sanghvi is a full-stack web and WordPress developer, UI designer, and full-time freelancer who builds and maintains Hex Calculator.
Further reading: CSS Colors — W3Schools
How Hex to Material Design Conversion Works
Google's Material Design system defines a base palette of 19 hues, each with an official 500-tier hex value from m2.material.io — the mid-tone shade most commonly used as the representative color for that hue family. This tool compares your input hex against all 19 using the redmean weighted-Euclidean color-distance formula and returns the closest match with a similarity percentage.
Hex to Material Design Example, Step by Step
#2196F3 = Blue 500
#2196F3 (hex) = Blue 500 (2196F3) — exact match
Compare #2196F3 against all 19 Material Design 500-tier colors Distance to Blue 500 (#2196F3) = 0 -> exact match Distance to every other hue > 0 Result: Blue 500 (2196F3) — exact match
| Step | Description | Result |
|---|---|---|
| Take the input hex | #2196F3 | input color |
| Compare to all 19 hues | redmean distance to each 500-tier color | 19 distances |
| Find the smallest distance | Blue 500 (#2196F3) has distance 0 | Blue 500 |
| Report the match | distance 0 means an exact hit | Blue 500 (2196F3) — exact match |
A non-palette input like #2563EB still resolves to the nearest hue — Blue 500 at 86.5% similar — rather than an exact match, since it only compares against 19 fixed reference points.
Where Hex to Material Design Actually Comes Up
Checking Brand Color Compatibility With Material Design
Before adopting Material Design for an app, checking how close existing brand colors sit to the base palette reveals how much visual adjustment the migration will need.
brand hex -> nearest Material hue + %
Finding a Ready-Made Tonal Palette
If a color is close enough to a Material hue, switching to that hue gives you access to Material's full 50-900 tonal range for free instead of generating your own tints and shades.
custom color -> Material hue family
Naming an Arbitrary Color for Design Discussion
Referring to a color as "close to Material Teal 500" gives designers and developers a shared reference point, even when the exact hex is something else entirely.
arbitrary hex -> nearest named reference
Common Mistakes With Hex to Material Design
- Expecting a match against every Material Design tonal shade (50-900) instead of just the 19 base 500-tier hues.
- Treating a "closest match" percentage as an exact palette hit rather than the nearest of 19 fixed options.
- Confusing Material Design 2 (m2) values with the newer Material You dynamic color system, which generates palettes per device rather than using a fixed hex list.
Why Use This Calculator Instead of Eyeballing It
- Uses a perceptually-aware distance formula, not just raw RGB difference
- Runs entirely in your browser — nothing you type gets sent anywhere
- Shows a similarity percentage, not just a guess
- Checks against all 19 hues at once instead of comparing manually
Limitations
- Finds the closest match in a fixed swatch list using weighted color distance — this is an approximation, not an official conversion, since the underlying brand doesn't publish a public hex specification.
Frequently Asked Questions
What is the Material Design 500-tier palette?
It's Google's official base color set from m2.material.io — 19 hues (Red, Pink, Purple, Deep Purple, Indigo, Blue, Light Blue, Cyan, Teal, Green, Light Green, Lime, Yellow, Amber, Orange, Deep Orange, Brown, Grey, Blue Grey) each anchored at their mid-tone "500" shade.
How does this tool find the closest Material Design color?
It compares your hex input against all 19 Material Design 500-tier colors using the redmean weighted-Euclidean color-distance formula and returns the nearest one with a similarity percentage.
What's the hex value of Material Blue 500?
#2196F3 — the official Material Design Blue 500 value.
Why does #2563EB resolve to Blue 500 instead of an exact hex?
#2563EB isn't one of the 19 official 500-tier values, so the tool returns the closest one by color distance — Blue 500 (#2196F3), at 86.5% similar.
Does this cover the full Material Design tonal range (50-900)?
No — this tool only covers the 19 base 500-tier hues, which are the most commonly referenced shade in each Material Design color family, not every lighter or darker tint.
How do I check if my brand color already fits Material Design's palette?
Convert your brand hex here — a high similarity percentage (95%+) suggests it's already close to an official Material hue, while a lower percentage means you're working with a genuinely custom color.
Should I use the exact Material hue or my original hex in an Android app?
If your brand color needs to match precisely, keep your original hex. If close enough is fine and you want built-in Material tonal variants (300, 700, etc.), switching to the matched Material hue gives you a ready-made palette family.