{"id":26,"date":"2026-01-30T21:53:05","date_gmt":"2026-01-30T21:53:05","guid":{"rendered":"https:\/\/blog.apexo.app\/?p=26"},"modified":"2026-02-21T19:23:08","modified_gmt":"2026-02-21T19:23:08","slug":"shade-picker-app","status":"publish","type":"post","link":"https:\/\/blog.apexo.app\/?p=26","title":{"rendered":"Shade Picker App"},"content":{"rendered":"\n<p>Shade selection has always been one of the most deceptively difficult tasks in restorative dentistry.<\/p>\n\n\n\n<p>Even with high-end cameras, good lighting, and experience, matching a tooth to a shade guide is still influenced by:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ambient light conditions<\/li>\n\n\n\n<li>Camera auto-adjustments<\/li>\n\n\n\n<li>Surface reflections<\/li>\n\n\n\n<li>Regional color variation across the tooth<\/li>\n\n\n\n<li>Human perception bias<\/li>\n<\/ul>\n\n\n\n<p>What if we approached shade selection not as a \u201cpick the closest tab\u201d problem \u2014 but as a structured color comparison problem grounded in color science?<\/p>\n\n\n\n<p>That\u2019s the idea behind <strong>Shade Master<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<!--more-->\n\n\n\n<p>\ud83d\udc49 GitHub: <a href=\"https:\/\/github.com\/elselawi\/shade-master\">https:\/\/github.com\/elselawi\/shade-master<\/a><\/p>\n\n\n\n<p>\ud83d\udc49 Download the app: <a href=\"https:\/\/shade.apexo.app\/\">Shade Master &#8211; Shade Matching for Dentists<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Continue reading if you&#8217;re interested in the tech and the algorithm behind the app.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">The Problem with Traditional Shade Matching<\/h1>\n\n\n\n<p>Natural teeth are not a single color.<\/p>\n\n\n\n<p>They are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Brighter at the cervical third<\/li>\n\n\n\n<li>More chromatic in the middle<\/li>\n\n\n\n<li>More translucent and darker at the incisal edge<\/li>\n<\/ul>\n\n\n\n<p>Most digital shade apps reduce the entire tooth to a single averaged RGB value. That approach throws away critical information.<\/p>\n\n\n\n<p>Shade Master does something different.<\/p>\n\n\n\n<p>It treats shade selection as a <strong>multi-region color comparison problem<\/strong> using perceptually accurate color spaces.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">The Core Idea Behind the Algorithm<\/h1>\n\n\n\n<p>Instead of comparing raw RGB values, Shade Master:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Splits the tooth into multiple regions<\/li>\n\n\n\n<li>Extracts representative colors from each region<\/li>\n\n\n\n<li>Converts them to CIELAB (a perceptually uniform color space)<\/li>\n\n\n\n<li>Compares full tonal distributions instead of single color points<\/li>\n\n\n\n<li>Selects the shade with the lowest average \u0394 (Delta E)<\/li>\n<\/ol>\n\n\n\n<p>This is not just picking a color.<br>It is comparing two color distributions intelligently.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">How the Algorithm Works<\/h1>\n\n\n\n<p>Here\u2019s a simplified breakdown of the process.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/elselawi\/shade-master\/refs\/heads\/main\/alg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1 \u2014 Divide the Tooth Into Regions<\/h2>\n\n\n\n<p>The clinical tooth image is divided into structured regions (for example: cervical, middle, incisal).<\/p>\n\n\n\n<p>Each region is processed independently.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2 \u2014 Extract Representative Colors<\/h2>\n\n\n\n<p>For each region:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>RGB pixels are collected<\/li>\n\n\n\n<li>Converted to CIELAB<\/li>\n\n\n\n<li>Sorted by lightness (L*)<\/li>\n\n\n\n<li>Outliers are pruned<\/li>\n\n\n\n<li>The median brightness color is selected<\/li>\n<\/ul>\n\n\n\n<p>Why CIELAB?<\/p>\n\n\n\n<p>Because <strong>CIELAB models human color perception more accurately than RGB<\/strong>.<br>Equal distances in LAB better represent perceived color difference.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3 \u2014 Build a Unified Tooth Palette<\/h2>\n\n\n\n<p>All cleaned regional palettes are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Merged<\/li>\n\n\n\n<li>Re-sorted by brightness<\/li>\n\n\n\n<li>Evenly sampled to match the size of shade region palettes<\/li>\n<\/ul>\n\n\n\n<p>This creates a <strong>structured tonal fingerprint<\/strong> of the tooth.<\/p>\n\n\n\n<p>Not just one color \u2014 but a gradient signature.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4 \u2014 Process Each Shade Tab the Same Way<\/h2>\n\n\n\n<p>Each candidate shade (A, B, C, D, etc.) goes through the same pipeline:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Region segmentation<\/li>\n\n\n\n<li>RGB \u2192 CIELAB conversion<\/li>\n\n\n\n<li>Brightness sorting<\/li>\n\n\n\n<li>Outlier pruning<\/li>\n<\/ul>\n\n\n\n<p>The shade is now represented as a structured color distribution.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5 \u2014 One-to-One Tonal Mapping<\/h2>\n\n\n\n<p>Instead of averaging everything into a single number, Shade Master:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Aligns sorted tooth palette with sorted shade palette<\/li>\n\n\n\n<li>Performs one-to-one mapping<\/li>\n\n\n\n<li>Calculates \u0394E for each paired color<\/li>\n\n\n\n<li>Computes the average \u0394<\/li>\n<\/ul>\n\n\n\n<p>The shade with the <strong>lowest average Delta E<\/strong> wins.<\/p>\n\n\n\n<p>Not the brightest.<br>Not the closest in RGB.<br>The one with the highest overall tonal fidelity.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Why This Matters Clinically<\/h1>\n\n\n\n<p>For dentists:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Accounts for cervical-to-incisal variation<\/li>\n\n\n\n<li>Reduces operator bias<\/li>\n\n\n\n<li>Uses perceptual color space (CIELAB)<\/li>\n\n\n\n<li>Produces repeatable, objective comparisons<\/li>\n\n\n\n<li>Improves communication with labs<\/li>\n<\/ul>\n\n\n\n<p>It transforms shade matching from a subjective judgment into a measurable comparison.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Why This Matters Technically<\/h1>\n\n\n\n<p>For developers:<\/p>\n\n\n\n<p>Shade Master demonstrates:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Practical use of CIELAB color space<\/li>\n\n\n\n<li>Outlier rejection for real-world image noise<\/li>\n\n\n\n<li>Brightness-based palette alignment<\/li>\n\n\n\n<li>Distribution comparison instead of centroid comparison<\/li>\n\n\n\n<li>Deterministic selection using \u0394E metrics<\/li>\n<\/ul>\n\n\n\n<p>It\u2019s an applied example of:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Image processing<\/li>\n\n\n\n<li>Perceptual color science<\/li>\n\n\n\n<li>Data normalization<\/li>\n\n\n\n<li>Matching algorithms<\/li>\n<\/ul>\n\n\n\n<p>All implemented in a lightweight application architecture.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Designed by a Dentist Who Codes<\/h1>\n\n\n\n<p>Shade Master isn\u2019t an academic prototype.<\/p>\n\n\n\n<p>It was built by a practicing dentist who understands:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The frustration of real shade matching<\/li>\n\n\n\n<li>The limitations of chairside lighting<\/li>\n\n\n\n<li>The variability of natural dentition<\/li>\n<\/ul>\n\n\n\n<p>And also understands:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Color mathematics<\/li>\n\n\n\n<li>Software architecture<\/li>\n\n\n\n<li>Deterministic algorithm design<\/li>\n<\/ul>\n\n\n\n<p>That combination matters.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Final Thoughts<\/h1>\n\n\n\n<p>Shade selection should not depend solely on the human eye.<\/p>\n\n\n\n<p>With structured regional analysis and perceptual color matching, we can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reduce remakes<\/li>\n\n\n\n<li>Improve lab communication<\/li>\n\n\n\n<li>Increase restorative accuracy<\/li>\n\n\n\n<li>Standardize digital shade selection<\/li>\n<\/ul>\n\n\n\n<p>Shade Master is a step toward that future.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shade selection has always been one of the most deceptively difficult tasks in restorative dentistry. Even with high-end cameras, good lighting, and experience, matching a tooth to a shade guide is still influenced by: What if we approached shade selection not as a \u201cpick the closest tab\u201d problem \u2014 but as a structured color comparison [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.apexo.app\/index.php?rest_route=\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.apexo.app\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.apexo.app\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.apexo.app\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.apexo.app\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":4,"href":"https:\/\/blog.apexo.app\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/blog.apexo.app\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/blog.apexo.app\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.apexo.app\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.apexo.app\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}