{"id":1401,"date":"2026-04-24T20:41:52","date_gmt":"2026-04-24T20:41:52","guid":{"rendered":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/"},"modified":"2026-04-24T20:41:52","modified_gmt":"2026-04-24T20:41:52","slug":"dark-mode-done-right-hsl","status":"publish","type":"post","link":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/","title":{"rendered":"Dark Mode Done Right: It&#8217;s Not Just Swapping Black and White"},"content":{"rendered":"<h1>Dark Mode Done Right: It&#8217;s Not Just Swapping Black and White<\/h1>\n<p>In the early days of &#8220;Dark Mode&#8221; implementation, the approach was simple: take your white background, turn it into pure black (<code>#000000<\/code>), and turn your black text into pure white (<code>#FFFFFF<\/code>). It was quick, it was easy, and it was\u2014quite frankly\u2014terrible.<\/p>\n<p>If you&#8217;ve ever opened a &#8220;lazy&#8221; dark mode site in a dark room, you know the feeling. The high contrast of pure white text on a pitch-black background causes &#8220;halation&#8221;\u2014the text looks like it&#8217;s glowing or vibrating, leading to immediate eye strain. As a developer at Nassim Studio, I view dark mode as more than just a toggle; it is a critical part of the user&#8217;s sensory experience. <\/p>\n<p>In this post, we&#8217;re going to dive deep into how to implement a &#8220;High-Fidelity&#8221; dark mode. We&#8217;ll explore why pure black is a design sin, how to leverage the <strong>HSL<\/strong> (and the new <strong>OKLCH<\/strong>) color models for perfect harmony, and how to implement this elegantly using Tailwind CSS v4.<\/p>\n<h2>The Problem with Binary Contrast<\/h2>\n<p>The human eye doesn&#8217;t actually see &#8220;pure black&#8221; or &#8220;pure white&#8221; in nature. We see gradients of light and shadow. When you use absolute <code>#000000<\/code> for your background, you&#8217;re creating a &#8220;void&#8221; where there is no sense of depth or layering.<\/p>\n<h3>1. The Halation Effect<\/h3>\n<p>Pure white text on a pure black background has a 21:1 contrast ratio. While this sounds good for accessibility, it actually exceeds the &#8220;sweet spot&#8221; for comfortable reading. The extreme contrast causes the white light from the text to bleed into the surrounding black pixels in your eye, making the characters appear blurry or &#8220;fuzzy.&#8221;<\/p>\n<h3>2. Loss of Elevation<\/h3>\n<p>In modern UI design, we use shadows and light to show &#8220;elevation&#8221; (which items are &#8220;closer&#8221; to the user). In a pure black interface, shadows are invisible. You lose the ability to show that a modal is floating above the page or that a card is elevated above the background.<\/p>\n<blockquote>\n<p><strong>The Contrarian Reality:<\/strong> A &#8220;Dark Mode&#8221; site should feel like a premium library at night\u2014dimly lit but rich in texture and depth\u2014not like a terminal window from 1982.<\/p>\n<\/blockquote>\n<h2>Mastering HSL: The Secret to Harmony<\/h2>\n<p>To build a sophisticated dark mode, you need to move away from the <strong>Hex<\/strong> or <strong>RGB<\/strong> color models. They are &#8220;machine-centric,&#8221; not &#8220;human-centric.&#8221; Instead, we use <strong>HSL<\/strong> (Hue, Saturation, Lightness).<\/p>\n<p>HSL allows you to keep your &#8220;Hue&#8221; consistent across both light and dark modes while only adjusting the &#8220;Lightness&#8221; and &#8220;Saturation.&#8221; This ensures that your dark mode still feels like it belongs to your brand.<\/p>\n<h3>The &#8220;Slightly Saturated&#8221; Background<\/h3>\n<p>Instead of <code>#000000<\/code>, I use a very dark version of my brand&#8217;s primary hue. If your brand color is a Burnt Orange, your dark mode background should be a very dark &#8220;Deep Charcoal&#8221; with a 2-3% saturation of that orange. This creates a subtle warmth that feels significantly more premium than a generic gray.<\/p>\n<h3>The Elevation Strategy<\/h3>\n<p>In dark mode, the &#8220;closer&#8221; an object is to the user, the <strong>lighter<\/strong> its background should be.<br \/>\n*   <strong>Level 0 (Background)<\/strong>: 5% Lightness<br \/>\n*   <strong>Level 1 (Cards\/Sections)<\/strong>: 8% Lightness<br \/>\n*   <strong>Level 2 (Modals\/Overlays)<\/strong>: 12% Lightness<\/p>\n<p>This creates a sense of depth and hierarchy that mimics how light works in the real world.<\/p>\n<h2>Implementation: Tailwind CSS v4 and the OKLCH Revolution<\/h2>\n<p>Tailwind CSS v4 has introduced native support for <strong>OKLCH<\/strong>, which is an even more advanced color space designed for &#8220;Perceptual Brightness.&#8221; Unlike HSL, OKLCH ensures that different hues with the same &#8220;Lightness&#8221; value actually <em>look<\/em> equally bright to the human eye.<\/p>\n<p>Here is how I structure my &#8220;Sovereign&#8221; dark mode system using CSS variables and Tailwind.<\/p>\n<pre class=\"codehilite\"><code class=\"language-css\">@theme {\n  \/* Define our base semantic tokens *\/\n  --color-bg-base: oklch(15% 0.01 25);     \/* Very dark, slightly warm charcoal *\/\n  --color-bg-surface: oklch(20% 0.01 25);  \/* Elevated surface *\/\n\n  --color-text-base: oklch(90% 0.01 25);   \/* Off-white, soft on the eyes *\/\n  --color-text-muted: oklch(70% 0.01 25);  \/* Muted text for secondary info *\/\n\n  \/* The magic of dark mode *\/\n  @variant dark {\n    --color-bg-base: oklch(98% 0.01 25);    \/* Soft white background *\/\n    --color-bg-surface: oklch(100% 0 0);    \/* Pure white surface *\/\n    --color-text-base: oklch(15% 0.01 25);  \/* Dark charcoal text *\/\n  }\n}\n<\/code><\/pre>\n<p>By using these semantic variables, your components don&#8217;t need to know if they are in &#8220;dark&#8221; or &#8220;light&#8221; mode. They just use <code>bg-bg-base<\/code> and <code>text-text-base<\/code>, and the CSS variables handle the rest.<\/p>\n<h2>System Preference vs. Manual Toggle<\/h2>\n<p>A common debate is whether to force a mode or respect the system preference. The professional answer is: <strong>Do both.<\/strong><\/p>\n<ol>\n<li><strong>Respect the System<\/strong>: On first load, use the user&#8217;s OS-level preference (<code>prefers-color-scheme<\/code>). This shows the user that your site respects their environment.<\/li>\n<li><strong>Allow Override<\/strong>: Provide a prominent toggle (usually in the header or footer). When a user clicks it, save their preference to <code>localStorage<\/code>.<\/li>\n<li><strong>No Flash of Unstyled Content (FOUC)<\/strong>: Use a tiny blocking script in the <code>&lt;head&gt;<\/code> of your site to check <code>localStorage<\/code> and apply the correct class <em>before<\/em> the body renders. This prevents that annoying &#8220;white flash&#8221; when a dark mode user opens your page.<\/li>\n<\/ol>\n<pre class=\"codehilite\"><code class=\"language-javascript\">\/\/ In your &lt;head&gt; to prevent flashing\n(function() {\n  const theme = localStorage.getItem('theme') || \n                (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');\n  if (theme === 'dark') {\n    document.documentElement.classList.add('dark');\n  }\n})();\n<\/code><\/pre>\n<h2>Accessibility: Beyond the Contrast Ratio<\/h2>\n<p>While the WCAG contrast ratio (4.5:1 for normal text) is the standard, dark mode requires extra care. <\/p>\n<ul>\n<li><strong>Avoid Pure White (#FFFFFF)<\/strong>: Use an off-white like <code>#F9F9F9<\/code> or <code>oklch(95% ...)<\/code>. It reduces the halation effect significantly.<\/li>\n<li><strong>Decrease Font Weight<\/strong>: Dark text on a light background looks slightly thinner than light text on a dark background. In dark mode, you might want to decrease your <code>font-weight<\/code> slightly (e.g., from <code>500<\/code> to <code>400<\/code>) to maintain the same visual &#8220;weight.&#8221;<\/li>\n<li><strong>Saturated Colors in Dark Mode<\/strong>: Be careful with highly saturated colors (like bright blue) on dark backgrounds. They can &#8220;vibrate&#8221; and cause strain. Desaturate your primary colors by 10-20% when in dark mode for a more balanced look.<\/li>\n<\/ul>\n<h2>Conclusion: Designing for the User&#8217;s Context<\/h2>\n<p>Dark mode isn&#8217;t a feature; it&#8217;s a context. It&#8217;s a recognition that your user might be reading your technical deep-dives at 2:00 AM in a dimly lit room, or while commuting in a bright train. <\/p>\n<p>By moving away from binary black-and-white swaps and embracing perceptual color models like HSL and OKLCH, you create an interface that feels alive, premium, and\u2014most importantly\u2014comfortable. This level of technical and design foresight is what separates a &#8220;commodity&#8221; developer from a high-end agency.<\/p>\n<p><strong>What&#8217;s your biggest struggle with implementing dark mode? Do you prefer a custom toggle or relying purely on system settings? Let&#8217;s discuss in the comments.<\/strong><\/p>\n<p><em>Internal Link Suggestion: To see how I handle the typography side of premium design, check out <a href=\"\/typography-that-sells\">Typography That Sells: Choosing Fonts for a Premium Web Presence<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why pure black is a design sin, how to leverage HSL colors for perfect harmony, and implementing dark mode elegantly with Tailwind v4.<\/p>\n","protected":false},"author":1,"featured_media":1400,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"","_yoast_wpseo_metadesc":"Why pure black is a design sin, how to leverage HSL colors for perfect harmony, and implementing dark mode elegantly with Tailwind v4.","footnotes":""},"categories":[3],"tags":[12,9,24,13],"class_list":["post-1401","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-design","tag-css","tag-tailwind","tag-ui-design","tag-web-design"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dark Mode Done Right: It&#039;s Not Just Swapping Black and White - Nassim Studio<\/title>\n<meta name=\"description\" content=\"Why pure black is a design sin, how to leverage HSL colors for perfect harmony, and implementing dark mode elegantly with Tailwind v4.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dark Mode Done Right: It&#039;s Not Just Swapping Black and White - Nassim Studio\" \/>\n<meta property=\"og:description\" content=\"Why pure black is a design sin, how to leverage HSL colors for perfect harmony, and implementing dark mode elegantly with Tailwind v4.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/\" \/>\n<meta property=\"og:site_name\" content=\"Nassim Studio\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/nassimstudiodigital\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-24T20:41:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nassimstudio.com\/blog\/wp-content\/uploads\/2026\/04\/batch2_3-8.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Breeze\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Breeze\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/\"},\"author\":{\"name\":\"Breeze\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#\\\/schema\\\/person\\\/a33ac49313e86188e9b9d672f665b914\"},\"headline\":\"Dark Mode Done Right: It&#8217;s Not Just Swapping Black and White\",\"datePublished\":\"2026-04-24T20:41:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/\"},\"wordCount\":1010,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/batch2_3-8.jpg\",\"keywords\":[\"CSS\",\"Tailwind\",\"UI Design\",\"Web Design\"],\"articleSection\":[\"Web Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/\",\"url\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/\",\"name\":\"Dark Mode Done Right: It's Not Just Swapping Black and White - Nassim Studio\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/batch2_3-8.jpg\",\"datePublished\":\"2026-04-24T20:41:52+00:00\",\"description\":\"Why pure black is a design sin, how to leverage HSL colors for perfect harmony, and implementing dark mode elegantly with Tailwind v4.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/#primaryimage\",\"url\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/batch2_3-8.jpg\",\"contentUrl\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/batch2_3-8.jpg\",\"width\":1200,\"height\":675},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/dark-mode-done-right-hsl\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dark Mode Done Right: It&#8217;s Not Just Swapping Black and White\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/\",\"name\":\"Nassim Studio\",\"description\":\"Practical WordPress, web design, freelancing, performance, and local AI workflow guides.\",\"publisher\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#organization\",\"name\":\"Nassim Studio\",\"url\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/Logo-Nassim-studio.png\",\"contentUrl\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/Logo-Nassim-studio.png\",\"width\":687,\"height\":640,\"caption\":\"Nassim Studio\"},\"image\":{\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/nassimstudiodigital\",\"https:\\\/\\\/www.instagram.com\\\/nassim.studio\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/nassim-studio\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/#\\\/schema\\\/person\\\/a33ac49313e86188e9b9d672f665b914\",\"name\":\"Breeze\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/58cb6f70c7779d3dbb9c5eeaa90c47c3f543c035e1ad5224ca4de5eb888f40f4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/58cb6f70c7779d3dbb9c5eeaa90c47c3f543c035e1ad5224ca4de5eb888f40f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/58cb6f70c7779d3dbb9c5eeaa90c47c3f543c035e1ad5224ca4de5eb888f40f4?s=96&d=mm&r=g\",\"caption\":\"Breeze\"},\"sameAs\":[\"https:\\\/\\\/nassimstudio.com\\\/blog\"],\"url\":\"https:\\\/\\\/nassimstudio.com\\\/blog\\\/author\\\/breeze\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dark Mode Done Right: It's Not Just Swapping Black and White - Nassim Studio","description":"Why pure black is a design sin, how to leverage HSL colors for perfect harmony, and implementing dark mode elegantly with Tailwind v4.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/","og_locale":"en_US","og_type":"article","og_title":"Dark Mode Done Right: It's Not Just Swapping Black and White - Nassim Studio","og_description":"Why pure black is a design sin, how to leverage HSL colors for perfect harmony, and implementing dark mode elegantly with Tailwind v4.","og_url":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/","og_site_name":"Nassim Studio","article_publisher":"https:\/\/www.facebook.com\/nassimstudiodigital","article_published_time":"2026-04-24T20:41:52+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/nassimstudio.com\/blog\/wp-content\/uploads\/2026\/04\/batch2_3-8.jpg","type":"image\/jpeg"}],"author":"Breeze","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Breeze","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/#article","isPartOf":{"@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/"},"author":{"name":"Breeze","@id":"https:\/\/nassimstudio.com\/blog\/#\/schema\/person\/a33ac49313e86188e9b9d672f665b914"},"headline":"Dark Mode Done Right: It&#8217;s Not Just Swapping Black and White","datePublished":"2026-04-24T20:41:52+00:00","mainEntityOfPage":{"@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/"},"wordCount":1010,"commentCount":0,"publisher":{"@id":"https:\/\/nassimstudio.com\/blog\/#organization"},"image":{"@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/#primaryimage"},"thumbnailUrl":"https:\/\/nassimstudio.com\/blog\/wp-content\/uploads\/2026\/04\/batch2_3-8.jpg","keywords":["CSS","Tailwind","UI Design","Web Design"],"articleSection":["Web Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/","url":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/","name":"Dark Mode Done Right: It's Not Just Swapping Black and White - Nassim Studio","isPartOf":{"@id":"https:\/\/nassimstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/#primaryimage"},"image":{"@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/#primaryimage"},"thumbnailUrl":"https:\/\/nassimstudio.com\/blog\/wp-content\/uploads\/2026\/04\/batch2_3-8.jpg","datePublished":"2026-04-24T20:41:52+00:00","description":"Why pure black is a design sin, how to leverage HSL colors for perfect harmony, and implementing dark mode elegantly with Tailwind v4.","breadcrumb":{"@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/#primaryimage","url":"https:\/\/nassimstudio.com\/blog\/wp-content\/uploads\/2026\/04\/batch2_3-8.jpg","contentUrl":"https:\/\/nassimstudio.com\/blog\/wp-content\/uploads\/2026\/04\/batch2_3-8.jpg","width":1200,"height":675},{"@type":"BreadcrumbList","@id":"https:\/\/nassimstudio.com\/blog\/dark-mode-done-right-hsl\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nassimstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Dark Mode Done Right: It&#8217;s Not Just Swapping Black and White"}]},{"@type":"WebSite","@id":"https:\/\/nassimstudio.com\/blog\/#website","url":"https:\/\/nassimstudio.com\/blog\/","name":"Nassim Studio","description":"Practical WordPress, web design, freelancing, performance, and local AI workflow guides.","publisher":{"@id":"https:\/\/nassimstudio.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nassimstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/nassimstudio.com\/blog\/#organization","name":"Nassim Studio","url":"https:\/\/nassimstudio.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nassimstudio.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/nassimstudio.com\/blog\/wp-content\/uploads\/2026\/03\/Logo-Nassim-studio.png","contentUrl":"https:\/\/nassimstudio.com\/blog\/wp-content\/uploads\/2026\/03\/Logo-Nassim-studio.png","width":687,"height":640,"caption":"Nassim Studio"},"image":{"@id":"https:\/\/nassimstudio.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/nassimstudiodigital","https:\/\/www.instagram.com\/nassim.studio\/","https:\/\/www.linkedin.com\/company\/nassim-studio"]},{"@type":"Person","@id":"https:\/\/nassimstudio.com\/blog\/#\/schema\/person\/a33ac49313e86188e9b9d672f665b914","name":"Breeze","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/58cb6f70c7779d3dbb9c5eeaa90c47c3f543c035e1ad5224ca4de5eb888f40f4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/58cb6f70c7779d3dbb9c5eeaa90c47c3f543c035e1ad5224ca4de5eb888f40f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/58cb6f70c7779d3dbb9c5eeaa90c47c3f543c035e1ad5224ca4de5eb888f40f4?s=96&d=mm&r=g","caption":"Breeze"},"sameAs":["https:\/\/nassimstudio.com\/blog"],"url":"https:\/\/nassimstudio.com\/blog\/author\/breeze\/"}]}},"_links":{"self":[{"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/posts\/1401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=1401"}],"version-history":[{"count":0,"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/posts\/1401\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/media\/1400"}],"wp:attachment":[{"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=1401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=1401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nassimstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=1401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}