<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Sass Blog</title>
  <id>https://sass-lang.com/blog</id>
  <link href="https://sass-lang.com/blog"/>
  <link href="https://sass-lang.com/feed.xml" rel="self"/>
  <updated>2025-10-23T00:15:00Z</updated>
  <entry>
    <title>LibSass Has Reached End-Of-Life</title>
    <link href="https://sass-lang.com/blog/libsass-is-end-of-life/" rel="alternate"/>
    <id>https://sass-lang.com/blog/libsass-is-end-of-life/</id>
    <published>2025-10-23T00:15:00Z</published>
    <updated>2025-10-23T00:15:00Z</updated>
    <author>
      <name>Natalie Weizenbaum</name>
    </author>
    <content type="html">&lt;p&gt;LibSass and the packages built on top of it have been deprecated &lt;a href=&#34;https://sass-lang.com/blog/libsass-is-deprecated&#34;&gt;since October
2020&lt;/a&gt;. In the five years since we made that announcement, the Sass language has
continued to evolve to support the latest CSS features like color spaces, and
&lt;a href=&#34;https://sass-lang.com/blog/embedded-sass-is-live&#34;&gt;embedded sass&lt;/a&gt; made it easy to run Dart Sass across numerous different
languages and platforms.&lt;sup class=&#34;footnote-ref&#34;&gt;&lt;a href=&#34;https://sass-lang.com/blog/libsass-is-end-of-life/#fn1&#34; id=&#34;fnref1&#34;&gt;[1]&lt;/a&gt;&lt;/sup&gt; Dart Sass now meets essentially all the use-cases
that LibSass once did.&lt;/p&gt;
&lt;p&gt;At the same time, development of LibSass has faltered. There hasn&#39;t been a new
commit to the source code repository since December 2023, and there are numerous
issues languishing unaddressed. The time has come to be clear: LibSass is no
longer maintained and will receive no future updates.&lt;/p&gt;
&lt;h2 id=&#34;migrating-away&#34; tabindex=&#34;-1&#34;&gt;Migrating Away&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/libsass-is-end-of-life/#migrating-away&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Migrating Away permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As they say, the best time to migrate away from LibSass was five years ago, but
the second best time is now. There is a large and growing list of
incompatibilities between it and Dart Sass, largely to more correctly support
CSS features. You&#39;ll need to make sure your stylesheets are building without
deprecation warnings and then do some visual checks as well to see if there are
any more subtle differences.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://sass-lang.com/libsass&#34;&gt;LibSass page&lt;/a&gt; contains a summary of the most notable incompatibilities,
which may be helpful in knowing what to look for. Some of them also have
automated migrations available using the &lt;a href=&#34;https://sass-lang.com/documentation/cli/migrator&#34;&gt;Sass migrator&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;thanks-again&#34; tabindex=&#34;-1&#34;&gt;Thanks Again&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/libsass-is-end-of-life/#thanks-again&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Thanks Again permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I already mentioned this in the deprecation blog post, but thanks to everyone
who made LibSass happen. It was a crucial stepping stone to bring Sass outside
the Ruby bubble at a time when it was no longer the center of the web
development world, and I don&#39;t think it&#39;s an exaggeration to say that Sass is
still the world&#39;s most popular stylesheet preprocessor &lt;em&gt;because of&lt;/em&gt; LibSass. But
all things that rise must also fall, and this project&#39;s time has come.&lt;/p&gt;
&lt;hr class=&#34;footnotes-sep&#34;&gt;
&lt;section class=&#34;footnotes&#34;&gt;
&lt;ol class=&#34;footnotes-list&#34;&gt;
&lt;li id=&#34;fn1&#34; class=&#34;footnote-item&#34;&gt;&lt;p&gt;Intrepid Sass contributor &lt;a href=&#34;https://ntk.me/works/&#34;&gt;Natsuki&lt;/a&gt; is even working
on a way to run it on platforms the Dart VM doesn&#39;t support, like BSD
variants, by driving the embedded protocol using Node.js! &lt;a href=&#34;https://sass-lang.com/blog/libsass-is-end-of-life/#fnref1&#34; class=&#34;footnote-backref&#34;&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Request for Comments: Indented Syntax Improvements</title>
    <link href="https://sass-lang.com/blog/rfc-indented-syntax/" rel="alternate"/>
    <id>https://sass-lang.com/blog/rfc-indented-syntax/</id>
    <published>2024-12-03T23:30:00Z</published>
    <updated>2024-12-03T23:30:00Z</updated>
    <author>
      <name>James Stuckey Weber</name>
    </author>
    <content type="html">&lt;p&gt;For users of the indented syntax (&lt;code&gt;.sass&lt;/code&gt;), there has been a long standing
request for the ability to have line breaks that don&#39;t end a statement. Certain
CSS syntaxes like &lt;code&gt;grid-template&lt;/code&gt; and &lt;code&gt;@font-face&lt;/code&gt; &lt;code&gt;src&lt;/code&gt; declarations are long,
and line breaks can greatly increase the readability of the styles.&lt;/p&gt;
&lt;p&gt;There have been many suggestions, several attempts, and numerous workarounds to
address this pain point. We are proposing several new syntax options in the
indented syntax that add considerable flexibility and look to address this as
part of the language.&lt;/p&gt;
&lt;h2 id=&#34;multiline-statements&#34; tabindex=&#34;-1&#34;&gt;Multiline statements&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/rfc-indented-syntax/#multiline-statements&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Multiline statements permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We propose allowing statements in the indented syntax to span multiple lines, as
long as line breaks occur in places where the statement can&#39;t end.&lt;/p&gt;
&lt;p&gt;A common way of using this syntax will be wrapping lists with line breaks in
parentheses. This allows for a grid-template declaration on multiple lines.&lt;/p&gt;
&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token selector&#34;&gt;.grid&lt;/span&gt;
&lt;span class=&#34;token property-line&#34;&gt;  &lt;span class=&#34;token property&#34;&gt;display&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; grid&lt;/span&gt;
&lt;span class=&#34;token property-line&#34;&gt;  &lt;span class=&#34;token property&#34;&gt;grid-template&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; (&lt;/span&gt;
    &lt;span class=&#34;token string&#34;&gt;&#34;header&#34;&lt;/span&gt; min-content
    &lt;span class=&#34;token string&#34;&gt;&#34;main&#34;&lt;/span&gt; 1fr
  &lt;span class=&#34;token selector&#34;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As usual, these parentheses will not be included in the output.&lt;/p&gt;
&lt;pre class=&#34;language-css&#34;&gt;&lt;code class=&#34;language-css&#34;&gt;&lt;span class=&#34;token selector&#34;&gt;.grid&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
  &lt;span class=&#34;token property&#34;&gt;display&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; grid&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;
  &lt;span class=&#34;token property&#34;&gt;grid-template&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;header&#34;&lt;/span&gt; min-content &lt;span class=&#34;token string&#34;&gt;&#34;main&#34;&lt;/span&gt; 1fr&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Powering this change is the underlying rule that linebreaks only end statements
where it&#39;s valid for a statement to end. Anywhere where a statement can&#39;t end, a
linebreak is ignored. This means that if the parser can&#39;t tell whether or not a
linebreak is intended to end a statement, it will end the statement.&lt;/p&gt;
&lt;p&gt;This example demonstrates several places where line breaks will not end
statements.&lt;/p&gt;
&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@each&lt;/span&gt; $item in /* A statement can&#39;t end after the word &#34;in&#34; in an `&lt;span class=&#34;token atrule&#34;&gt;@each&lt;/span&gt;` statement. */&lt;/span&gt;
    &lt;span class=&#34;token selector&#34;&gt;1, 2, 3&lt;/span&gt;
  &lt;span class=&#34;token selector&#34;&gt;.item-#{ &lt;/span&gt;
&lt;span class=&#34;token variable-line&#34;&gt;    &lt;span class=&#34;token variable&#34;&gt;$item&lt;/span&gt; &lt;span class=&#34;token operator&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;*&lt;/span&gt; A statement can&#39;t end inside the curly braces in an interpolation. &lt;span class=&#34;token operator&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;/&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&#34;token selector&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;token property-line&#34;&gt;    &lt;span class=&#34;token property&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token variable&#34;&gt;$item&lt;/span&gt; &lt;span class=&#34;token operator&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;token operator&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;*&lt;/span&gt; A statement can&#39;t end after a multiplication operator. &lt;span class=&#34;token operator&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;/&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&#34;token selector&#34;&gt;10&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As a counter example, here are some places in the same stylesheet where
linebreaks could end statements. These linebreaks will cause compilation errors
because the &lt;em&gt;next&lt;/em&gt; line is not able to be parsed.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important! This code snippet demonstrates what will NOT work.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@each&lt;/span&gt; $item in 1, /* A statement can end after a value, even in the middle of a list. */&lt;/span&gt;
     &lt;span class=&#34;token selector&#34;&gt;2, 3&lt;/span&gt;
  &lt;span class=&#34;token selector&#34;&gt;.item-#{ $item }&lt;/span&gt;
&lt;span class=&#34;token property-line&#34;&gt;    &lt;span class=&#34;token property&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token variable&#34;&gt;$item&lt;/span&gt; &lt;span class=&#34;token operator&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;*&lt;/span&gt; A statement can end after a value, &lt;span class=&#34;token operator&#34;&gt;and&lt;/span&gt; does &lt;span class=&#34;token operator&#34;&gt;not&lt;/span&gt; look ahead for operators. &lt;span class=&#34;token operator&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;/&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&#34;token selector&#34;&gt;* 10&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;semicolons-are-also-allowed&#34; tabindex=&#34;-1&#34;&gt;Semicolons are also allowed&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/rfc-indented-syntax/#semicolons-are-also-allowed&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Semicolons are also allowed permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Another proposed change would allow semicolons to optionally be added at the end
of statements in the indented syntax. Indentation rules still apply, so you
won&#39;t be able to separate multiple statements on the same line, even with a
semicolon.&lt;/p&gt;
&lt;h2 id=&#34;no-breaking-changes&#34; tabindex=&#34;-1&#34;&gt;No breaking changes&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/rfc-indented-syntax/#no-breaking-changes&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;No breaking changes permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;These changes are opt-in, and authors who don&#39;t want to use the new syntax do
not have to. No changes need to be made to existing stylesheets written in the
indented syntax.&lt;/p&gt;
&lt;h2 id=&#34;an-update-to-the-proposal&#34; tabindex=&#34;-1&#34;&gt;An update to the proposal&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/rfc-indented-syntax/#an-update-to-the-proposal&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;An update to the proposal permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An earlier version of this post proposed a &amp;quot;SCSS-in-Sass&amp;quot; format. After feedback
from tool maintainers, this has been removed from the proposal, but we welcome
feedback on the &lt;a href=&#34;https://github.com/sass/sass/issues/4003&#34;&gt;Github issue&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;next-steps&#34; tabindex=&#34;-1&#34;&gt;Next steps&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/rfc-indented-syntax/#next-steps&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Next steps permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is still in the proposal phase, and we are open to feedback. Review the
proposal &lt;a href=&#34;https://github.com/sass/sass/blob/main/proposal/indented-syntax-improvements.md&#34;&gt;on Github&lt;/a&gt;, and &lt;a href=&#34;https://github.com/sass/sass/issues/new&#34;&gt;open an issue&lt;/a&gt; with any thoughts or concerns you
may have.&lt;/p&gt;
&lt;p&gt;In addition to feedback from authors using the indented syntax, we are also
interested in hearing from maintainers of tooling that supports the indented
syntax.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>`@import` is Deprecated</title>
    <link href="https://sass-lang.com/blog/import-is-deprecated/" rel="alternate"/>
    <id>https://sass-lang.com/blog/import-is-deprecated/</id>
    <published>2024-10-17T01:00:00Z</published>
    <updated>2024-10-17T01:00:00Z</updated>
    <author>
      <name>Jennifer Thakar</name>
    </author>
    <content type="html">&lt;p&gt;Back in 2019, we &lt;a href=&#34;https://sass-lang.com/blog/the-module-system-is-launched&#34;&gt;released the Sass module system&lt;/a&gt;, adding new &lt;code&gt;@use&lt;/code&gt; and
&lt;code&gt;@forward&lt;/code&gt; rules to the language that were designed to replace &lt;code&gt;@import&lt;/code&gt; and
make stylesheets more maintainable and less error-prone. We can now announce
that &lt;code&gt;@import&lt;/code&gt; is officially deprecated as of Dart Sass 1.80.0.&lt;/p&gt;
&lt;p&gt;The module system ensures that it&#39;s easy for both developers and tooling to
determine where a given Sass member is defined, adds namespacing to prevent the
need to manually add long, awkward namespaces to names, and allows library
authors to ensure their private helpers can&#39;t be accessed by downstream users.
Additionally, since each module is only ever loaded once, depending on the same
stylesheet multiple times no longer results in duplicated CSS.&lt;/p&gt;
&lt;p&gt;With 4.5 years since we released the module system and more than a year since
we passed the 80% Dart Sass usage share threshold we set for starting this
deprecation, we feel comfortable making this move. However, we understand that
this is a big change to the language and not all users have been able to fully
migrate off of &lt;code&gt;@import&lt;/code&gt; so far.&lt;/p&gt;
&lt;h2 id=&#34;controlling-deprecation-warnings&#34; tabindex=&#34;-1&#34;&gt;Controlling Deprecation Warnings&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/import-is-deprecated/#controlling-deprecation-warnings&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Controlling Deprecation Warnings permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;While users should treat this deprecation as a signal to migrate sooner rather
than later, for anyone who wishes to silence deprecation warnings for
&lt;code&gt;@import&lt;/code&gt;, we recently added a new &lt;code&gt;--silence-deprecation&lt;/code&gt; command line option.
Just pass &lt;code&gt;--silence-deprecation=import&lt;/code&gt; to Sass and you won&#39;t have to worry
about the deprecation warnings while you complete the migration. Equivalent
options exist in the JS and Dart APIs.&lt;/p&gt;
&lt;p&gt;On the other hand, users who have already migrated to the module system and
wish to prevent any backsliding can use the &lt;code&gt;--fatal-deprecation=import&lt;/code&gt; to
treat any Sass &lt;code&gt;@import&lt;/code&gt; rules as errors.&lt;/p&gt;
&lt;h2 id=&#34;timeline&#34; tabindex=&#34;-1&#34;&gt;Timeline&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/import-is-deprecated/#timeline&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Timeline permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As previously announced, given the size of this change, we expect to wait at
least a two years after this deprecation before we remove &lt;code&gt;@import&lt;/code&gt; from the
language. While we plan to release Dart Sass 2.0.0 soon with other, smaller
breaking changes, that release will not include any changes to &lt;code&gt;@import&lt;/code&gt;.
Instead, we expect &lt;code&gt;@import&lt;/code&gt; to be removed in Dart Sass 3.0.0.&lt;/p&gt;
&lt;h2 id=&#34;migrator&#34; tabindex=&#34;-1&#34;&gt;Migrator&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/import-is-deprecated/#migrator&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Migrator permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Users migrating off of &lt;code&gt;@import&lt;/code&gt; can use the Sass migrator to move to the
module system. Follow the &lt;a href=&#34;https://sass-lang.com/documentation/cli/migrator/#installation&#34;&gt;instructions&lt;/a&gt; to install it, then run it on your
application:&lt;/p&gt;
&lt;pre class=&#34;language-shellsession&#34;&gt;&lt;code class=&#34;language-shellsession&#34;&gt;&lt;span class=&#34;token command&#34;&gt;&lt;span class=&#34;token shell-symbol important&#34;&gt;$&lt;/span&gt; &lt;span class=&#34;token bash language-bash&#34;&gt;sass-migrator module --migrate-deps &lt;span class=&#34;token operator&#34;&gt;&amp;lt;&lt;/span&gt;path/to/style.scss&lt;span class=&#34;token operator&#34;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;built-in-functions&#34; tabindex=&#34;-1&#34;&gt;Built-in Functions&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/import-is-deprecated/#built-in-functions&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Built-in Functions permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Alongside this deprecation, we are also deprecating any uses of global built-in
Sass functions that are now available in built-in modules. In the past, we&#39;ve
had a number of conflicts between these functions and new plain CSS function
names, and moving to the module system will help us avoid further conflicts in
the future.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;global-builtin&lt;/code&gt; ID can be passed to the &lt;code&gt;--silence-deprecation&lt;/code&gt; or
&lt;code&gt;--fatal-deprecation&lt;/code&gt; flags on its own, or in combination with &lt;code&gt;import&lt;/code&gt;. This
deprecation will follow the same timeline as &lt;code&gt;@import&lt;/code&gt; for removal. For users
who want to migrate off of global functions but aren&#39;t ready to complete the
module system migration, we&#39;ve also added a new &lt;code&gt;--built-in-only&lt;/code&gt; flag to the
module system migrator.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Sass color spaces &amp; wide gamut colors</title>
    <link href="https://sass-lang.com/blog/wide-gamut-colors-in-sass/" rel="alternate"/>
    <id>https://sass-lang.com/blog/wide-gamut-colors-in-sass/</id>
    <published>2024-09-11T21:00:00Z</published>
    <updated>2024-09-11T21:00:00Z</updated>
    <author>
      <name>Miriam Suzanne</name>
    </author>
    <content type="html">&lt;p&gt;Wide gamut colors are coming to Sass!&lt;/p&gt;
&lt;p&gt;I should clarify. Wide gamut CSS color formats like &lt;code&gt;oklch(…)&lt;/code&gt; and &lt;code&gt;color(display-p3 …)&lt;/code&gt; have been available in all major browsers since May, 2023. But even before that, these new color formats were &lt;em&gt;allowed&lt;/em&gt; in Sass. This is one of my favorite features of Sass: most new CSS &lt;em&gt;just works&lt;/em&gt;, without any need for &amp;quot;official&amp;quot; support or updates. When Sass encounters unknown CSS, it passes that code along to the browser. Not everything needs to be pre-processed.&lt;/p&gt;
&lt;p&gt;Often, that&#39;s all we need. When Cascade Layers and Container Queries rolled out in browsers, there was nothing more for Sass to do. But the new CSS color formats are a bit different. Since colors are a first-class data type in Sass, we don&#39;t always want to pass them along &lt;em&gt;as-is&lt;/em&gt;. We often want to manipulate and manage colors before they go to the browser.&lt;/p&gt;
&lt;p&gt;Already know all about color spaces? &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#css-color-functions-in-sass&#34;&gt;Skip ahead to the new Sass features&lt;/a&gt;!&lt;/p&gt;
&lt;h2 id=&#34;the-color-format-trade-off&#34; tabindex=&#34;-1&#34;&gt;The color format trade-off&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#the-color-format-trade-off&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;The color format trade-off permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;CSS has historically been limited to &lt;code&gt;sRGB&lt;/code&gt; color formats, which share two main features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They use an underlying &lt;a href=&#34;https://en.wikipedia.org/wiki/RGB_color_model&#34;&gt;RGB color model&lt;/a&gt; for representing &amp;amp; manipulating colors mathematically by controlling the relative amounts of &lt;code&gt;red&lt;/code&gt;, &lt;code&gt;green&lt;/code&gt;, and &lt;code&gt;blue&lt;/code&gt; light.&lt;/li&gt;
&lt;li&gt;They can only represent colors in the &lt;a href=&#34;https://en.wikipedia.org/wiki/SRGB&#34;&gt;&lt;code&gt;sRGB&lt;/code&gt; color gamut&lt;/a&gt; -- the default range of color that can be displayed on color monitors since the mid 1990s.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;clear-gamut-boundaries&#34; tabindex=&#34;-1&#34;&gt;Clear gamut boundaries&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#clear-gamut-boundaries&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Clear gamut boundaries permalink&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The previously available formats in CSS -- named colors (e.g. &lt;code&gt;red&lt;/code&gt;), &lt;code&gt;hex&lt;/code&gt; colors (e.g. &lt;code&gt;#f00&lt;/code&gt;), and color functions (e.g. &lt;code&gt;rgb()&lt;/code&gt;/&lt;code&gt;rgba()&lt;/code&gt;, &lt;code&gt;hsl()&lt;/code&gt;/&lt;code&gt;hsla()&lt;/code&gt;, and more recently &lt;code&gt;hwb()&lt;/code&gt;) -- are all ways of describing &lt;code&gt;sRGB&lt;/code&gt; colors. Named colors are special, but the other formats use a &#39;coordinate&#39; system, as though the colors of the gamut were projected into 3d space:&lt;/p&gt;
&lt;figure&gt;
&lt;div style=&#34;display: grid; gap: var(--sl-gutter--quarter); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));&#34;&gt;
&lt;img src=&#34;https://sass-lang.com/assets/img/blog/042-srgb.png&#34; alt=&#34;sRGB gamut rendered in sRGB space forms a rainbow colored cube&#34; width=&#34;600&#34; height=&#34;600&#34;&gt;
&lt;img src=&#34;https://sass-lang.com/assets/img/blog/042-srgb-hsl.png&#34; alt=&#34;sRGB gamut rendered in hsl space forms a rainbow-edged cylinder with black at the bottom and white at the top&#34; width=&#34;600&#34; height=&#34;600&#34;&gt;
&lt;img src=&#34;https://sass-lang.com/assets/img/blog/042-srgb-hwb.png&#34; alt=&#34;sRGB gamut rendered in hwb space forms a rainbow-core top surface with a black-to-gray bottom and gray-to-white outside edge&#34; width=&#34;600&#34; height=&#34;600&#34;&gt;
&lt;/div&gt;
&lt;figcaption&gt;
Images generated using
&lt;a href=&#34;https://facelessuser.github.io/coloraide/demos&#34;&gt;ColorAide&lt;/a&gt;
by Isaac Muse.
&lt;/figcaption&gt;
&lt;figure&gt;
&lt;p&gt;Look at those nice, geometric shapes! RGB gives us a rainbow cube, while HSL and HWB (with their &amp;quot;polar&amp;quot; &lt;code&gt;hue&lt;/code&gt; channels) arrange those same colors into cylinders. The clean boundaries make it easy for us to know (mathematically) what colors are &lt;em&gt;in gamut&lt;/em&gt; or &lt;em&gt;out of gamut&lt;/em&gt;. In &lt;code&gt;rgb()&lt;/code&gt; we use values of &lt;code&gt;0-255&lt;/code&gt;. Anything inside that range will be inside the cube, but if a channel goes below &lt;code&gt;0&lt;/code&gt; or above &lt;code&gt;255&lt;/code&gt;, we&#39;re no longer inside the &lt;code&gt;sRGB&lt;/code&gt; gamut. In &lt;code&gt;hsl()&lt;/code&gt; and &lt;code&gt;hwb()&lt;/code&gt; the &lt;code&gt;hue&lt;/code&gt; coordinates can keep going around the circle without ever reaching escape velocity, but the &lt;code&gt;saturation&lt;/code&gt;, &lt;code&gt;lightness&lt;/code&gt;, &lt;code&gt;whiteness&lt;/code&gt;, and &lt;code&gt;blackness&lt;/code&gt; channels go cleanly from &lt;code&gt;0-1&lt;/code&gt; or &lt;code&gt;0%-100%&lt;/code&gt;. Again, anything outside that range is outside the color space.&lt;/p&gt;
&lt;h3 id=&#34;matching-human-perception&#34; tabindex=&#34;-1&#34;&gt;Matching human perception&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#matching-human-perception&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Matching human perception permalink&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;But that simplicity comes with limitations. The most obvious is that monitors keep getting better. These days, many monitors can display colors beyond &lt;code&gt;sRGB&lt;/code&gt;, especially extending the range of bright greens available. If we simply extend our shapes with the new colors available, we&#39;re no longer dealing with clean geometry!&lt;/p&gt;
&lt;div style=&#34;display: grid; gap: var(--sl-gutter--quarter); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));&#34;&gt;
&lt;img src=&#34;https://sass-lang.com/assets/img/blog/042-p3-srgb.png&#34; alt=&#34;display-p3 gamut rendered in sRGB space adds unequal red and green horns to the sRGB cube&#34; width=&#34;600&#34; height=&#34;600&#34;&gt;
&lt;img src=&#34;https://sass-lang.com/assets/img/blog/042-p3-hsl.png&#34; alt=&#34;display-p3 gamut rendered in hsl space creates a boot-like bulge of green near the base of the hsl cylinder&#34; width=&#34;600&#34; height=&#34;600&#34;&gt;
&lt;/div&gt;
&lt;p&gt;The crisp edges and clean math of &lt;code&gt;sRGB&lt;/code&gt; formats were only possible because we knew exactly what colors could be displayed, and we arranged those colors to fit perfectly into a box. But human color perception is not so clear-cut, and it doesn&#39;t align perfectly with the gamut of any monitors on the market. When we attempt to space all the same colors &lt;em&gt;evenly&lt;/em&gt; based on human perception rather than simple math, we get an entirely different shape with swooping edges. This is the &lt;code&gt;display-p3&lt;/code&gt; gamut in &lt;code&gt;oklch&lt;/code&gt; space:&lt;/p&gt;
&lt;img src=&#34;https://sass-lang.com/assets/img/blog/042-p3-oklch.png&#34; alt=&#34;display-p3 gamut rendered in oklch space forms a skewed cube with a conic black base&#34; width=&#34;600&#34; height=&#34;600&#34;&gt;
&lt;p&gt;The practical difference is particularly noticeable when we compare colors of the same &#39;lightness&#39; in &lt;code&gt;hsl&lt;/code&gt; vs &lt;code&gt;oklch&lt;/code&gt;. Humans perceive yellow hues as lighter than blues. By scaling them to fit in the same range, &lt;code&gt;hsl&lt;/code&gt; gives us a yellow that is much brighter than the blue:&lt;/p&gt;
&lt;img src=&#34;https://sass-lang.com/assets/img/blog/042-blue-yellow.jpg&#34; alt=&#34;on the left a blue and much brighter yellow, on the right our yellow is much darker to match the blue tone&#34; width=&#34;753&#34; height=&#34;209&#34;&gt;
&lt;h2 id=&#34;new-css-formats-give-us-the-choice&#34; tabindex=&#34;-1&#34;&gt;New CSS formats give us the choice&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#new-css-formats-give-us-the-choice&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;New CSS formats give us the choice permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Moving forward, there are two directions we could go with wide gamut colors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Color formats that re-fit larger and larger gamuts into simple coordinates, stretching the colors to preserve clean, geometric boundaries.&lt;/li&gt;
&lt;li&gt;Color formats that maintain their &lt;em&gt;perceptually uniform&lt;/em&gt; spacing, without any regard for specific gamuts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On the one hand, clean boundaries allow us to easily stay inside the range of available colors. Without those boundaries, it would be easy to &lt;em&gt;accidentally&lt;/em&gt; request colors that aren&#39;t even physically possible. On the other hand, we expect these colors to be &lt;em&gt;perceived&lt;/em&gt; by &lt;em&gt;other humans&lt;/em&gt; -- and we need to make things &lt;em&gt;look&lt;/em&gt; consistent, with enough contrast to be readable.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://www.w3.org/TR/css-color-4/&#34;&gt;CSS Color Module Level 4&lt;/a&gt; defines a number of new CSS color formats. Some of them maintain geometric access to specific color spaces. Like the more familiar &lt;code&gt;rgb()&lt;/code&gt; and &lt;code&gt;hsl()&lt;/code&gt; functions, the newer &lt;code&gt;hwb()&lt;/code&gt; function still describes colors in the &lt;code&gt;sRGB&lt;/code&gt; gamut, using &lt;code&gt;hue&lt;/code&gt;, &lt;code&gt;whiteness&lt;/code&gt;, and &lt;code&gt;blackness&lt;/code&gt; channels.  It&#39;s an interesting format, and &lt;a href=&#34;https://www.miriamsuzanne.com/2022/06/29/hwb-clamping/&#34;&gt;I&#39;ve written about it before&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The rest of the gamut-bounded spaces are available using the &lt;code&gt;color(&amp;lt;space&amp;gt; &amp;lt;3-channels&amp;gt; / &amp;lt;alpha&amp;gt;)&lt;/code&gt; function. Using that syntax we can define colors in &lt;code&gt;sRGB&lt;/code&gt;, &lt;code&gt;srbg-linear&lt;/code&gt;, &lt;code&gt;display-p3&lt;/code&gt; (common for modern monitors), &lt;code&gt;a98-rgb&lt;/code&gt;, &lt;code&gt;prophoto-rgb&lt;/code&gt;, and &lt;code&gt;rec2020&lt;/code&gt;. Each of these maps the specified gamut onto a range of (cubic) coordinates from &lt;code&gt;0-1&lt;/code&gt; or &lt;code&gt;0%-100%&lt;/code&gt;. Nice and clean.&lt;/p&gt;
&lt;p&gt;In the same &lt;code&gt;color()&lt;/code&gt; function, we can also access the &#39;device independent&#39; (and gamut-less) &lt;code&gt;xyz&lt;/code&gt; color spaces -- often used as an international baseline for converting between different color models. I won&#39;t get into &lt;a href=&#34;https://www.w3.org/TR/css-color-4/#white-point&#34;&gt;white points&lt;/a&gt; here, but we can specify &lt;code&gt;xyz-d65&lt;/code&gt; (the default) explicitly, or use &lt;code&gt;xyz-d50&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;Working outwards from &lt;code&gt;xyz&lt;/code&gt;, we get a number of new &lt;em&gt;theoretically unbounded&lt;/em&gt; color formats -- prioritizing &lt;em&gt;perceptually uniform&lt;/em&gt; distribution over clean geometry. These are available in functions of their own, including &lt;code&gt;lab()&lt;/code&gt; (&lt;code&gt;lightness&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, and &lt;code&gt;b&lt;/code&gt;) and &lt;code&gt;lch()&lt;/code&gt; (&lt;code&gt;lightness&lt;/code&gt;, &lt;code&gt;chroma&lt;/code&gt;, and &lt;code&gt;hue&lt;/code&gt;) along with the newer &#39;ok&#39; versions of each -- &lt;code&gt;oklab()&lt;/code&gt; and &lt;code&gt;oklch()&lt;/code&gt;. If you want the full history of these formats, &lt;a href=&#34;https://ericportis.com/posts/2024/okay-color-spaces/&#34;&gt;Eric Portis has written a great explainer&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;tl-dr-top-priority-new-formats&#34; tabindex=&#34;-1&#34;&gt;TL;DR top priority new formats&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#tl-dr-top-priority-new-formats&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;TL;DR top priority new formats permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For the color experts, it&#39;s great to have all this flexibility. For the rest of us, there are a few stand-out formats:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;color(display-p3 …)&lt;/code&gt; provides access to a wider gamut of colors, which are available on many modern displays, while maintaining a clear set of gamut boundaries.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;oklch(…)&lt;/code&gt; is the most intuitive and perceptually uniform space to work in, a newer alternative to &lt;code&gt;hsl(…)&lt;/code&gt; -- &lt;code&gt;chroma&lt;/code&gt; is very similar to &lt;code&gt;saturation&lt;/code&gt;. But there are few guard rails here, and it&#39;s easy to end up outside the gamuts that any screen can possibly display. The coordinate system is still describing a cylinder, but the edges of human perception and display technology don&#39;t map neatly into that space.&lt;/li&gt;
&lt;li&gt;For transitions and gradients, if we want to go directly between hues (instead of going around the color wheel), &lt;code&gt;oklab(…)&lt;/code&gt; is a good linear option. Usually, a transition or gradient between two in-gamut colors will stay in gamut -- but we can&#39;t always rely on that when we&#39;re dealing with extremes of saturation or lightness.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;css-color-functions-in-sass&#34; tabindex=&#34;-1&#34;&gt;CSS color functions in Sass&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#css-color-functions-in-sass&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;CSS color functions in Sass permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sass now accepts all the new CSS formats, and treats them as first-class &lt;em&gt;colors&lt;/em&gt; that we can manipulate, mix, convert, and inspect. These functions are all available globally:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;lab()&lt;/code&gt;, &lt;code&gt;oklab()&lt;/code&gt;, &lt;code&gt;lch()&lt;/code&gt;, and &lt;code&gt;oklch()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color()&lt;/code&gt; using the &lt;code&gt;sRGB&lt;/code&gt;, &lt;code&gt;srgb-linear&lt;/code&gt;, &lt;code&gt;display-p3&lt;/code&gt;, &lt;code&gt;a98-rgb&lt;/code&gt;, &lt;code&gt;prophoto-rgb&lt;/code&gt;, &lt;code&gt;rec2020&lt;/code&gt;, &lt;code&gt;xyz&lt;/code&gt;, &lt;code&gt;xyz-d65&lt;/code&gt;, and &lt;code&gt;xyz-d50&lt;/code&gt; color spaces&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hwb()&lt;/code&gt; (Sass previously had a &lt;code&gt;color.hwb()&lt;/code&gt; function, which is now deprecated in favor of the global function)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Sass color functions use the same syntax as the CSS functions, which means that a given color can be represented in a variety of different spaces. For example, these are all the same color:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJwzNHRISU0qTVfwTU3JLM0Ny8zPSS0JSk2x5oKKKzubG5pamML5GcU5GsZGRnpGChYGepaGqgomxnqGJqqacAX52TnJGRqmpnrGJqoKBnpGRobmCsYmlnrmCCXJ+Tn5RRopmcUFOYmVugXGQGXmhmZA0tDcDMQxNTQw1bQGAIfRKgY=&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; MediumVioletRed&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; #C71585&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;hsl&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;322.2 80.91% 43.14%&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;oklch&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;55.34% 0.2217 349.7&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;display-p3 0.716 0.1763 0.5105&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJwzMHRISU0qTVfwTU3JLM0Ny8zPSS0JSk3hggorO5sbmlqYwrgZxTkaxkZGekYKFgZ6loaqCibGeoYmqpow+fzsnOQMDVNTPWMTVQUDPSMjQ3MFYxNLPXO4iuT8nPwijZTM4oKcxErdAmOgKnNDMyBpaG4G4pgaGphqAgDBsCje&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; MediumVioletRed&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; #C71585&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; hsl(322.2 80.91% 43.14%)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; oklch(55.34% 0.2217 349.7)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color(display-p3 0.716 0.1763 0.5105)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;sass-colors-hold-their-space&#34; tabindex=&#34;-1&#34;&gt;Sass colors hold their space&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#sass-colors-hold-their-space&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Sass colors hold their space permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Historically, both CSS and Sass would treat the different color-spaces as &lt;em&gt;interchangeable&lt;/em&gt;. When all the color formats describe the same color gamut using the same underlying model, you can provide a color using &lt;code&gt;hsl()&lt;/code&gt; syntax, and the parser can eagerly convert it to &lt;code&gt;rgb()&lt;/code&gt; without risking any data loss. That&#39;s no longer the case for modern color spaces.&lt;/p&gt;
&lt;p&gt;In general, any color defined in a given space will remain in that space, and be emitted in that space. The space is defined by the function used, either one of the named spaced passed to &lt;code&gt;color()&lt;/code&gt;, or the function name (e.g. &lt;code&gt;lab&lt;/code&gt; for colors defined using the &lt;code&gt;lab()&lt;/code&gt; function).&lt;/p&gt;
&lt;p&gt;However, the &lt;code&gt;rgb&lt;/code&gt;, &lt;code&gt;hsl&lt;/code&gt;, and &lt;code&gt;hwb&lt;/code&gt; spaces are considered &amp;quot;legacy spaces&amp;quot;, and often get special handling for the sake of backwards compatibility. Legacy colors are still emitted in the most backwards-compatible format available. This matches CSS’s own backwards-compatibility behavior. Colors defined using hex notation or CSS color names are also considered part of the legacy &lt;code&gt;rgb&lt;/code&gt; color space.&lt;/p&gt;
&lt;p&gt;Sass provides a variety of tools for inspecting and working with these color spaces:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We can inspect the space of a color using &lt;code&gt;color.space($color)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;We can ask if the color is in a legacy space with &lt;code&gt;color.is-legacy($color)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;We can &lt;em&gt;convert&lt;/em&gt; a color from one space to another using &lt;code&gt;color.to-space($color, $space)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of these functions are provided by the built-in &lt;a href=&#34;https://sass-lang.com/documentation/modules/color/&#34;&gt;Sass Color Module&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyljrEOgjAURfd+xRs0hQSKIIRYFn7AxcG9tE8kVmv62sG/N8EBcXW9N/fcU5Z9JAROikhqZ53nHdsMXj2MhCOaKd7Pk7MYTmg6xooCPFK0gST4ccgg+IisNzjEEea5oKfSmHwQabfuJsotjkq/ln5BSnA3q69J04h9vYWdqKqyhX19EG26xgSXf79kwOclT38M5zSDi7L0l+QbXqtetA==&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; MediumVioletRed&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// results: rgb, true&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;space&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;is-legacy&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: oklch(55.34% 0.2217 349.7)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;to-space&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;oklch&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// results: oklch, false&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;space&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;is-legacy&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyljjsOwjAQRHufYguQEylx/opwlQvQUNA79hIiDEZeu+D2SEECQks7o3nzymqIhMBJEUntrPOcbUavbkbCHs0cr8fZWQwHNIwVBXikaANJ8NOYQfAR2WBwjBMsY0F3pTF5EdJ1NVNucVL68a4/QAnuYvU56TrRtFsoRV1XPTTtTvQ/lODy748M+LLk6VpvCTM4KUt/GD4BJepdFg==&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; MediumVioletRed&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// results: rgb, true&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.space($brand)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.is-legacy($brand)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: oklch(55.34% 0.2217 349.7)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.to-space($brand, &#39;oklch&#39;)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// results: oklch, false&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.space($brand)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.is-legacy($brand)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Once we convert a color between spaces, we no longer consider those colors to be &lt;em&gt;equal&lt;/em&gt;. But we can ask if they would render as &#39;the same&#39; color, using the &lt;code&gt;color.same()&lt;/code&gt; function:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJxVjssKgzAURPf5igutqNBGk/pIIoK/EvUmhaYNJOb/Cy5aXQ0MnDnD2JQiQh51jGrxzod8IFcf9MfiPdhZwcWY1tT1v/UvtzwV7FF0gvY8A15T2XWiFbyXGTSMNkxI0XLJHivaciCkqiBgTG5TYLSLSKYV52Th4IJxhJPkjG0h/aj9KY36jcVh4HbGy+EL0shESw==&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$orange-rgb&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; #ff5f00&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$orange-oklch&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;oklch&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;68.72% 20.966858279% 41.4189852913deg&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: false&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; &lt;span class=&#34;token variable&#34;&gt;$orange-rgb&lt;/span&gt; &lt;span class=&#34;token operator&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;token variable&#34;&gt;$orange-oklch&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: true&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;same&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$orange-rgb&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token variable&#34;&gt;$orange-oklch&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJxVzt8KgyAYBfB7n+KDLSrYTF1/VAh6FSt1MDfBL99/0EXU1YEDP85hfMpooUSDqJcYYirJPSbz8/aZ/Kzh5lznGDvK+AnLW8MeVS/pIAoQjKq+l50Ugyqg5bTlUslOKP5ara8JaRpIFnPYNDgT0JJptXP2cFqCcYTLxkVtKR9of0nRfG118o+rrv+t6UMj&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$orange-rgb&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; #ff5f00&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$orange-oklch&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; oklch(68.72&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt; 20.966858279&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt; 41.4189852913deg)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: false&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; $orange-rgb &lt;span class=&#34;token atrule&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;token atrule&#34;&gt;=&lt;/span&gt; $orange-oklch&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: true&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.same($orange-rgb, $orange-oklch)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can inspect the individual channels of a color using &lt;code&gt;color.channel()&lt;/code&gt;. By default, it only supports channels that are available in the color&#39;s own space, but we can pass the &lt;code&gt;$space&lt;/code&gt; parameter to return the value of the channel value after converting to the given space:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyNzEEKgzAQQNF9TjGIooLEpMUKycarxDiY0iEpGXN/QXdddfvhfa2XwggtO2bjE6XcWlGv2cXNQGDqFGilGnhMUje9FWIcISMXOszdxLLhWna4rPTBxYjU3YcBKnrv4YjIXP3g5yxf8/96gJq/zqOB9CEfensC6Eo4jw==&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;hsl&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;0 100% 25.1%&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: 25.1%&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;channel&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;lightness&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: 37.67%&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;channel&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;lightness&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$space&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; oklch&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyNzMEKhCAQgOG7TzFEUUGYFhV46lXMhlx20HDy/Re2U7euP3y/0mtmhJots3GRYqpFuSUbdgOeqVGglapgmKSuWiH6HhJypsvcSaw7bvmAv5TO2xCQmnvQQUGfw18BmYunHRc5L+9xByWf1qGB+CXn2x8kxTei&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; hsl(0 100&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt; 25.1&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt;)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: 25.1%&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.channel($brand, &#34;lightness&#34;)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: 37.67%&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.channel($brand, &#34;lightness&#34;, $space: oklch)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;CSS has also introduced the concept of &#39;powerless&#39; and &#39;missing&#39; color channels. For example, an &lt;code&gt;hsl&lt;/code&gt; color with &lt;code&gt;0%&lt;/code&gt; saturation will &lt;em&gt;always be grayscale&lt;/em&gt;. In that case, we can consider the &lt;code&gt;hue&lt;/code&gt; channel to be powerless. Changing its value won&#39;t have any impact on the resulting color. Sass allows us to ask if a channel is powerless using the &lt;code&gt;color.is-powerless()&lt;/code&gt; function:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyNzMEOgjAMgOH7nqIhEjBBGRcP48KrFKxjScNMu8b49iJHT17/5P+GYTIlaBRVw5I5SzO6UxR8B1iVWw++hpuvz6NzfQ9CalwCFDHqYKYFv7diMcGS8gZJwbvpTrNFOLhr0sszv0iYVNtD7qBajaof8oGs9MfKKa5l28sOfAB/OD4U&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$gray&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;hsl&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;0 0% 60%&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: true, because saturation is 0&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;is-powerless&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$gray&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;hue&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: false&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;is-powerless&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$gray&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;lightness&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyNzDEOwjAMQNE9p7AqqrZSoWFhyNSruMUkkawG2bEqbg90Y2P90n/+OpsSdIqqYS1cpHOnKPgKkJR7D76Fm28H56YJhNS4BqhiNMJCK35fxWqCNZcNsoJ3850Wi3Bgl6znZ9lJmFT7Ax6hSUbNr/hAVvrj5BxT3T6lGd6usz0n&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$gray&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; hsl(0 0&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt; 60&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt;)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: true, because saturation is 0&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.is-powerless($gray, &#34;hue&#34;)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: false&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.is-powerless($gray, &#34;lightness&#34;)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Taking that a step farther, CSS also allows us to explicitly mark a channel as &#39;missing&#39; or unknown. That can happen automatically if we convert a color like &lt;code&gt;gray&lt;/code&gt; into a color space like &lt;code&gt;oklch&lt;/code&gt; -- we don&#39;t have any information about the &lt;code&gt;hue&lt;/code&gt;. We can also create colors with missing channels explicitly by using the &lt;code&gt;none&lt;/code&gt; keyword, and inspect if a color channel is missing with the &lt;code&gt;color.is-missing()&lt;/code&gt; function:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyNzEEOgjAQBdB9TzEhEjBRoCZsyoarFBnbJnWa9Lf318iOlQd4T+u1gqmDBcwzxZS7RV22bGU35BF7ScKkp6mlxzzo9rooNY6UGTUWQy8bwWrdeauOfnwIuL8DEMT1x3OjJgbnizDQnHzJ9Q/uK3/hB/2ONqM=&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;hsl&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;none 100% 25.1%&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: false&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;is-missing&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;lightness&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: true&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;is-missing&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;hue&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyNzEEKwyAQBdC9pxikIQm0iRaycZWrmGaqwlTBr/cvtKvueoD3jN07mEZ4wD2KlDqqy1F9Ph1FyJRLZrLGDHTfFjvMSq0rVUaX5ujpBaz2k48e6IOXhNsrASmH6dtcSUsKsWUG9C9vtf+hY2c9vwFCejW2&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; hsl(none 100&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt; 25.1&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt;)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: false&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.is-missing($brand, &#34;lightness&#34;)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: true&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.is-missing($brand, &#34;hue&#34;)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Like CSS, Sass maintains missing channels where they can be meaningful, but treats them as a value of &lt;code&gt;0&lt;/code&gt; when a channel value is required.&lt;/p&gt;
&lt;h2 id=&#34;manipulating-sass-colors&#34; tabindex=&#34;-1&#34;&gt;Manipulating Sass colors&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#manipulating-sass-colors&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Manipulating Sass colors permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The existing &lt;code&gt;color.scale()&lt;/code&gt;, &lt;code&gt;color.adjust()&lt;/code&gt;, and &lt;code&gt;color.change()&lt;/code&gt; functions will continue to work as expected. By default, all color manipulations are performed &lt;em&gt;in the space provided by the color&lt;/em&gt;. But we can now also specify an explicit color space for transformations:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyVzUEOwiAQheE9p5hFSdvEUNBSDWx6FUonxUiKYcr9JboyceP2/cn3lJoLIbTkiIxPMeXWsmbJbl8NBIqdBCUlh7MWiveWsWGAjFTi8ZXHi7jxns0rLmWDtyPIu4jdxzpBE+9bOHasNxX7RWlxnUBPFdNi/AurAz2dRwPpEX3o7Qua7z48&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;hsl&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;0 100% 25.1%&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: hsl(0 100% 43.8%)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;scale&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$lightness&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; 25%&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: hsl(5.76 56% 45.4%)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;scale&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$lightness&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; 25%&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$space&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; oklch&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyVzUEKgzAQheF9TjELRYUSk9ZYycqrxDiY0sGUjLl/g10Vuun2/fA9pefMCA07ZusjxdSIakluXy0EplaBVqqGq5G67oToe0jImY6vOtzkVOq84pI3OBXJ3hG2H+oCFT22cOxYTor1QzLyPoIZi2Xk8JdVBn45jxbik3zo3r4EPU8=&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$brand&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; hsl(0 100&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt; 25.1&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt;)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: hsl(0 100% 43.8%)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.scale($brand, $lightness: 25%)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: hsl(5.76 56% 45.4%)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.scale($brand, $lightness: 25%, $space: oklch)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that the returned color is still returned in the original color space, even when the adjustment is performed in a different space. That way we can start to use more advanced color spaces like &lt;code&gt;oklch&lt;/code&gt; where they are useful, without necessarily relying on browsers to support those formats.&lt;/p&gt;
&lt;p&gt;The existing &lt;code&gt;color.mix()&lt;/code&gt; function will also maintain existing behavior &lt;em&gt;when both colors are in legacy color spaces&lt;/em&gt;. Legacy mixing is always done in &lt;code&gt;rgb&lt;/code&gt; space. We can opt into other mixing techniques using the new &lt;code&gt;$method&lt;/code&gt; parameter, which is designed to match the CSS specification for describing &lt;a href=&#34;https://www.w3.org/TR/css-color-4/#interpolation-space&#34;&gt;interpolation methods&lt;/a&gt; – used in CSS gradients, filters, animations, and transitions as well as the new CSS &lt;code&gt;color-mix()&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;For legacy colors, the method is optional. But for non-legacy colors, a method is required. In most cases, the method can simply be a color space name. But when we&#39;re using a color space with &amp;quot;polar hue&amp;quot; channel (such as &lt;code&gt;hsl&lt;/code&gt;, &lt;code&gt;hwb&lt;/code&gt;, &lt;code&gt;lch&lt;/code&gt;, or &lt;code&gt;oklch&lt;/code&gt;) we can also specify the &lt;em&gt;direction&lt;/em&gt; we want to move around the color wheel: &lt;code&gt;shorter hue&lt;/code&gt;, &lt;code&gt;longer hue&lt;/code&gt;, &lt;code&gt;increasing hue&lt;/code&gt;, or &lt;code&gt;decreasing hue&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyVzUFqwzAQheG9TzGQFscgK5qxRvI4m1wljoUdolQgRZDjp3RXKJTs3/8+xFMtAdpyLmW6pJhye2yawwFyKDU+Jtg5Z4xIc1rCXFf4mej79bnPYVEwxxoUWPPZ/a7yOu/RO03CxuHAMijoadSjkLXixVgFyKLRs8dxYOLuP0HBxz08trRMEM/zH16PJJqZrNDgvu+taEOCQuQ8KfBei7PCaCzRO1q6xcsGMX2tIcNWQ3d8AV86VUs=&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: #660099&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;mix&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;red&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; blue&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; 40%&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: rgb(176.2950613593, -28.8924497904, 159.1757183525)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;mix&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;red&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; blue&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; 40%&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$method&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; lab&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: rgb(-129.55249236, 149.0291922672, 77.9649510422)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;mix&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;red&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; blue&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; 40%&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$method&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; oklch longer hue&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyVzUFqwzAQheG9TzGQBsegyJqxRvJ4lavEsbBL5QqkCHr8lu5CFiH797/P4KWWAG25ljLdUky5bZq+hxxKjfcJDs4ZI9JcljDXFf4Xev/8OeWwKJhjDQqsOXYPUV7nE3qnSdg4HFgGBWca9ShkrXgxVgGyaPTscRyYuHsFKPjYw31LywTxOj9zZyTRzGSFBvf3bkUbEhQi50mB91qcFUZjid7B0le8bRDT9xoybDV0vySOVF4=&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: #660099&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.mix(red, blue, 40%)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: rgb(176.2950613593, -28.8924497904, 159.1757183525)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.mix(red, blue, 40%, $method: lab)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: rgb(-129.55249236, 149.0291922672, 77.9649510422)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.mix(red, blue, 40%, $method: oklch longer hue)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this case, the first color in the mix is considered the &amp;quot;origin&amp;quot; color. Like the other functions above, we can use different spaces for mixing, but the result will always be returned in that origin color space.&lt;/p&gt;
&lt;h2 id=&#34;working-with-gamut-boundaries&#34; tabindex=&#34;-1&#34;&gt;Working with gamut boundaries&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#working-with-gamut-boundaries&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Working with gamut boundaries permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;So what happens when you go outside the gamut of a given display? Browsers are still debating the details, but everyone agrees we have to display &lt;em&gt;something&lt;/em&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Currently, browsers convert every color into &lt;code&gt;red&lt;/code&gt;, &lt;code&gt;green&lt;/code&gt;, and &lt;code&gt;blue&lt;/code&gt; channels for display. If any of those channels are too high or two low for a given screen, they get &lt;em&gt;clamped&lt;/em&gt; at the highest or lowest value allowed. This is often referred to as &#39;channel clipping&#39;. It keeps the math simple, but it can have a weird effect on both the &lt;code&gt;hue&lt;/code&gt; and &lt;code&gt;lightness&lt;/code&gt; if some channels are clipped more than others.&lt;/li&gt;
&lt;li&gt;The CSS specification says that preserving &lt;code&gt;lightness&lt;/code&gt; should be the highest priority, and provides an algorithm for reducing &lt;code&gt;chroma&lt;/code&gt; until the color is in gamut. That&#39;s great for maintaining readable text, but it&#39;s more work for browsers, and it can be surprising when colors suddenly lose their vibrance.&lt;/li&gt;
&lt;li&gt;There&#39;s been some progress on a compromise approach, reducing &lt;code&gt;chroma&lt;/code&gt; to get colors inside the &lt;code&gt;rec2020&lt;/code&gt; gamut, and clipping from there.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since browser behavior is still unreliable, and some color spaces (&lt;em&gt;cough&lt;/em&gt; &lt;code&gt;oklch&lt;/code&gt;) can easily launch us out of any available gamut, it can be helpful to do some gamut management in Sass.&lt;/p&gt;
&lt;p&gt;We can use &lt;code&gt;color.is-in-gamut()&lt;/code&gt; to test if a particular color is in a given gamut. Like our other color functions, this will default to the space the color is defined in, but we can provide a &lt;code&gt;$space&lt;/code&gt; parameter to test it against a different gamut:&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyVjUEKgzAURPc5xV8IKhittKkYN14l6jeERg35CbS3r9gupLtuZjHDe1PXfSSElBSRHDe7+bRjCT6DV9yZ9SHhKLPJkLPqxd0VLmUr6j1votmzEfc27xirKvBI0QYJwUcsYN48nCitlhhYP+EQ9cdZGuJm5ceQnS5/bLOy9NWR18MfogIScmpEeYB59wbodU0v&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$extra-pink&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;display-p3 0.951 0.457 0.7569&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: true, for display-p3 gamut&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;is-in-gamut&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$extra-pink&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: false, for srgb gamut&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;is-in-gamut&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$extra-pink&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$space&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; srgb&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyVjTsOgzAQRHufYgskQMJ8lBCEK66ygLGsONjy2lJy+yAnBSnTTDGj96btpkgSckIisVhjfc4y+QweudP7XUDqilWTM/ji7gJtPfbdkdd+OHLob2PJWNOAlxRNEBB8lBVs1sMJUviIgU2rnKP6KGtNXO88DcXp8Ve2oaGvjbya//BUkJHDRYoElm/kE0xC&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$extra-pink&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; color(display-p3 0.951 0.457 0.7569)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: true, for display-p3 gamut&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.is-in-gamut($extra-pink)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: false, for srgb gamut&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.is-in-gamut($extra-pink, $space: srgb)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can also use the &lt;code&gt;color.to-gamut()&lt;/code&gt; function to explicitly move a color so that it is in a particular gamut. Since there are several options on the table, and no clear sense what default CSS will use long-term, this function currently requires an explicit &lt;code&gt;$method&lt;/code&gt; parameter. The current options are &lt;code&gt;clip&lt;/code&gt; (as is currently applied by browsers) or &lt;code&gt;local-minde&lt;/code&gt; (as is currently specified):&lt;/p&gt;
&lt;div class=&#34;code-example ui-tabs&#34;&gt;
  &lt;ul class=&#34;ui-tabs-nav ui-helper-reset ui-helper-clearfix&#34;&gt;&lt;li class=&#34;ui-tabs-tab ui-tabs-active&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-scss&#34; class=&#34;ui-tabs-anchor&#34;&gt;SCSS&lt;/a&gt;
&lt;/li&gt;
&lt;li class=&#34;ui-tabs-tab&#34;&gt;
  &lt;a href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#example-color-fns-sass&#34; class=&#34;ui-tabs-anchor&#34;&gt;Sass&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div id=&#34;example-color-fns-scss&#34; class=&#34;ui-tabs-panel scss sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyVzkEOgjAQBdA9p5iFBk2glmk7bWXDVRAaJBRKKCQeXzExceHGxV/Nz7xfFNUWHaSxjvHaBB+WtEwO7rEudT7303CFMPjmfrL8CHt467pzmSSXCywubn79FMgwQbxQZNCaV4+h5dxYLS0I8b5JYRGl3R8kVetuWwdvkK0h7+pxW09fbgZx6W4ZNL6ff3rGMF1oYSUpxN3jRFogJy1BKMUEvoYoItT/gT40tc/HfmrduXwCxm1S+w==&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;SCSS Syntax&lt;/h3&gt;&lt;pre class=&#34;language-scss&#34;&gt;&lt;code class=&#34;language-scss&#34;&gt;&lt;span class=&#34;token keyword&#34;&gt;@use&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#39;sass:color&#39;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token property&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$extra-pink&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token function&#34;&gt;oklch&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;90% 90% 0deg&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: oklch(68.3601568298% 0.290089749 338.3604392249deg)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;to-gamut&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$extra-pink&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; srgb&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; clip&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: oklch(88.7173946522% 0.0667320674 355.3282956627deg)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token keyword&#34;&gt;@debug&lt;/span&gt; color.&lt;span class=&#34;token function&#34;&gt;to-gamut&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;token variable&#34;&gt;$extra-pink&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; srgb&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt; local-minde&lt;span class=&#34;token punctuation&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;;&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div id=&#34;example-color-fns-sass&#34; class=&#34;ui-tabs-panel sass ui-tabs-panel-inactive sl-c-code-panel&#34;&gt;&lt;a href=&#34;https://sass-lang.com/playground#eJyVzkEOgjAQBdA9p5iFBk2klGk7bV15lQINEqo1lCYeXyExceHGxaz+/3nDm0tOHsrkUjp3McS5LHb+ucyueoz36QxxCt31YPke1uO9H45FUdcw+5TD8snJMEG8UWTQmneNoeXcWC0tCLFlUlhEabf9pfdtHmDj2BKrwd3ycvhiT5DmoT1BF8bHL84YphstrCSFuHKcSAvkpCUIpZjA9x+KCPV/XoidC9VtvPf++AKdolIO&#34; class=&#34;sl-c-to-playground&#34; target=&#34;_blank&#34;&gt;
      &lt;img class=&#34;sl-c-to-playground__logo&#34; height=&#34;24&#34; alt=&#34;Sass&#34; src=&#34;https://sass-lang.com/assets/img/logos/logo.svg&#34;&gt;
      Playground
    &lt;/a&gt;&lt;h3 class=&#34;visuallyhidden&#34;&gt;Sass Syntax&lt;/h3&gt;&lt;pre class=&#34;language-sass&#34;&gt;&lt;code class=&#34;language-sass&#34;&gt;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@use&lt;/span&gt; &#39;sass:color&#39;&lt;/span&gt;&amp;#10;&lt;span class=&#34;token variable-line&#34;&gt;&lt;span class=&#34;token variable&#34;&gt;$extra-pink&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;:&lt;/span&gt; oklch(90&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt; 90&lt;span class=&#34;token operator&#34;&gt;%&lt;/span&gt; 0deg)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: oklch(68.3601568298% 0.290089749 338.3604392249deg)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.to-gamut($extra-pink, srgb, clip)&lt;/span&gt;&amp;#10;&amp;#10;&lt;span class=&#34;token comment&#34;&gt;// result: oklch(88.7173946522% 0.0667320674 355.3282956627deg)&lt;/span&gt;&amp;#10;&lt;span class=&#34;token atrule-line&#34;&gt;&lt;span class=&#34;token atrule&#34;&gt;@debug&lt;/span&gt; color.to-gamut($extra-pink, srgb, local-minde)&lt;/span&gt;&amp;#10;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;All legacy and RGB-style spaces represent bounded gamuts of color. Since mapping colors into gamut is a lossy process, it should generally be left to browsers or done with caution. For that reason, out-of-gamut channel values are maintained by Sass, even when converting into gamut-bounded color spaces.&lt;/p&gt;
&lt;p&gt;Legacy browsers require colors in the &lt;code&gt;srgb&lt;/code&gt; gamut. However, most modern displays support the wider &lt;code&gt;display-p3&lt;/code&gt; gamut.&lt;/p&gt;
&lt;h2 id=&#34;deprecated-functions&#34; tabindex=&#34;-1&#34;&gt;Deprecated functions&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/wide-gamut-colors-in-sass/#deprecated-functions&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;Deprecated functions permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A number of existing functions only make sense for legacy colors, and so are being deprecated in favor of color-space-friendly functions like &lt;code&gt;color.channel()&lt;/code&gt; and &lt;code&gt;color.adjust()&lt;/code&gt;. Eventually these will be removed from Sass entirely, but all the same functionality is still available in the updated functions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;color.red()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color.green()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color.blue()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color.hue()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color.saturation()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color.lightness()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color.whiteness()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color.blackness()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;adjust-hue()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;saturate()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;desaturate()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;transparentize()&lt;/code&gt;/&lt;code&gt;fade-out()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;opacify()&lt;/code&gt;/&lt;code&gt;fade-in()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;lighten()&lt;/code&gt;/&lt;code&gt;darken()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We&#39;ve added &lt;a href=&#34;https://sass-lang.com/documentation/cli/migrator#color&#34;&gt;a migrator&lt;/a&gt; to automatically
convert these legacy functions to the color-space-friendly ones.&lt;/p&gt;
&lt;pre class=&#34;language-shellsession&#34;&gt;&lt;code class=&#34;language-shellsession&#34;&gt;&lt;span class=&#34;token command&#34;&gt;&lt;span class=&#34;token shell-symbol important&#34;&gt;$&lt;/span&gt; &lt;span class=&#34;token bash language-bash&#34;&gt;sass-migrator color --migrate-deps &lt;span class=&#34;token operator&#34;&gt;&amp;lt;&lt;/span&gt;path/to/style.scss&lt;span class=&#34;token operator&#34;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;&lt;/figure&gt;</content>
  </entry>
  <entry>
    <title>Node Sass is end-of-life</title>
    <link href="https://sass-lang.com/blog/node-sass-is-end-of-life/" rel="alternate"/>
    <id>https://sass-lang.com/blog/node-sass-is-end-of-life/</id>
    <published>2024-07-24T23:00:00Z</published>
    <updated>2024-07-24T23:00:00Z</updated>
    <author>
      <name>Natalie Weizenbaum</name>
    </author>
    <content type="html">&lt;p&gt;The time has finally come to retire Node Sass. This Node.js wrapper for LibSass
was the first official Sass compiler available in the JavaScript ecosystem and
was a huge part of Sass growing beyond the scope of the Ruby community where it
originated, but it hasn&#39;t received a new release in a year and a half and the
most recent set of maintainers no longer have the bandwidth to continue updating
it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.npmjs.com/package/node-sass&#34;&gt;The npm package&lt;/a&gt; has been marked as deprecated, and &lt;a href=&#34;https://github.com/sass/node-sass&#34;&gt;the GitHub repository&lt;/a&gt; has
been archived to mitigate confusion about which Sass repositories are still
being developed. If you&#39;re still using Node Sass, we strongly recommend you take
this opportunity to migrate to the primary implementation, &lt;a href=&#34;https://sass-lang.com/dart-sass&#34;&gt;Dart Sass&lt;/a&gt;, instead.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://sass-lang.com/libsass/&#34;&gt;LibSass&lt;/a&gt; implementation that Node Sass used remains deprecated but not yet
end-of-life, as its maintainer Marcel Greter continues to make occasional fixes.
However, there is no longer an officially-supported way to use this
implementation from Node.js.&lt;/p&gt;
&lt;p&gt;I want to take this opportunity to thank everyone who used Node Sass over the
years, as well as the major contributors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Michael Mifsud&lt;/li&gt;
&lt;li&gt;Adeel Mujahid&lt;/li&gt;
&lt;li&gt;Andrew Nesbitt&lt;/li&gt;
&lt;li&gt;Nick Schonning&lt;/li&gt;
&lt;li&gt;Marcin Cieślak&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And of course all the contributors to the underlying LibSass project as well.
Without you, we wouldn&#39;t be here today!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Announcing `pkg:` Importers</title>
    <link href="https://sass-lang.com/blog/announcing-pkg-importers/" rel="alternate"/>
    <id>https://sass-lang.com/blog/announcing-pkg-importers/</id>
    <published>2024-02-16T01:00:00Z</published>
    <updated>2024-02-16T01:00:00Z</updated>
    <author>
      <name>Natalie Weizenbaum</name>
    </author>
    <content type="html">&lt;p&gt;Several months ago, we &lt;a href=&#34;https://sass-lang.com/blog/rfc-package-importer&#34;&gt;asked for feedback&lt;/a&gt; on a proposal for a new standard for
importers that could load packages from various different package managers using
the shared &lt;code&gt;pkg:&lt;/code&gt; scheme, as well as a built-in &lt;code&gt;pkg:&lt;/code&gt; importer that supports
Node.js&#39;s module resolution algorithm. Today, I&#39;m excited to announce that this
feature has shipped in Dart Sass 1.71.0!&lt;/p&gt;
&lt;p&gt;No longer will you have to manually add &lt;code&gt;node_modules&lt;/code&gt; to your &lt;code&gt;loadPaths&lt;/code&gt;
option and worry about whether nested packages will work at all. No longer will
you need to add &lt;code&gt;~&lt;/code&gt;s to your URLs and give up all portability. Now you can just
pass &lt;code&gt;importers: [new NodePackageImporter()]&lt;/code&gt; and write &lt;code&gt;@use &#39;pkg:library&#39;&lt;/code&gt; and
it&#39;ll work just how you want out of the box.&lt;/p&gt;
&lt;h2 id=&#34;what-is-a-pkg-importer&#34; tabindex=&#34;-1&#34;&gt;What is a &lt;code&gt;pkg:&lt;/code&gt; importer?&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/announcing-pkg-importers/#what-is-a-pkg-importer&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;What is a pkg: importer? permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Think of a &lt;code&gt;pkg:&lt;/code&gt; importer like a specification that anyone can implement by
writing a &lt;a href=&#34;https://sass-lang.com/documentation/js-api/interfaces/Options/#importers&#34;&gt;custom importer&lt;/a&gt; that follows &lt;a href=&#34;https://sass-lang.com/documentation/at-rules/use#rules-for-a-pkg-importer&#34;&gt;a few rules&lt;/a&gt;. We&#39;ve implemented one for
the Node.js module algorithm, but you could implement one that loads Sass files
from &lt;a href=&#34;https://rubygems.org/&#34;&gt;RubyGems&lt;/a&gt; or &lt;a href=&#34;https://pypi.org/&#34;&gt;PyPI&lt;/a&gt; or &lt;a href=&#34;https://getcomposer.org/&#34;&gt;Composer&lt;/a&gt;. This way, a Sass file doesn&#39;t have to
change the URLs it loads no matter where it&#39;s loading them from.&lt;/p&gt;
&lt;h2 id=&#34;what-do-pkg-ur-ls-look-like&#34; tabindex=&#34;-1&#34;&gt;What do &lt;code&gt;pkg:&lt;/code&gt; URLs look like?&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/announcing-pkg-importers/#what-do-pkg-ur-ls-look-like&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;What do pkg: URLs look like? permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The simplest URL is just &lt;code&gt;pkg:library&lt;/code&gt;. This will find the &lt;code&gt;library&lt;/code&gt; package in
your package manager and load its primary entrypoint file, however that&#39;s
defined. You can also write &lt;code&gt;pkg:library/path/to/file&lt;/code&gt;, in which case it will
look for &lt;code&gt;path/to/file&lt;/code&gt; in the package&#39;s source directory instead. And as with
any Sass importer, it&#39;ll do the standard resolution to handle file extensions,
&lt;a href=&#34;https://sass-lang.com/documentation/at-rules/use#partials&#34;&gt;partials&lt;/a&gt;, and &lt;a href=&#34;https://sass-lang.com/documentation/at-rules/use#index-files&#34;&gt;index files&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;how-do-i-publish-an-npm-package-that-works-with-the-node-js-pkg-importer&#34; tabindex=&#34;-1&#34;&gt;How do I publish an npm package that works with the Node.js &lt;code&gt;pkg:&lt;/code&gt; importer?&lt;a class=&#34;anchor&#34; href=&#34;https://sass-lang.com/blog/announcing-pkg-importers/#how-do-i-publish-an-npm-package-that-works-with-the-node-js-pkg-importer&#34;&gt;&lt;span class=&#34;visuallyhidden&#34;&gt;How do I publish an npm package that works with the Node.js pkg: importer? permalink&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The Node.js &lt;code&gt;pkg:&lt;/code&gt; importer supports all the existing conventions for declaring
Sass files in &lt;code&gt;package.json&lt;/code&gt;, so it should work with existing Sass packages out
of the box. If you&#39;re writing a new package, we recommend using the &lt;a href=&#34;https://nodejs.org/api/packages.html#conditional-exports&#34;&gt;&lt;code&gt;&amp;quot;exports&amp;quot;&lt;/code&gt;
field&lt;/a&gt; with a &lt;code&gt;&amp;quot;sass&amp;quot;&lt;/code&gt; key to define which stylesheet to load by default:&lt;/p&gt;
&lt;pre class=&#34;language-json&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;&lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
  &lt;span class=&#34;token property&#34;&gt;&#34;exports&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;token property&#34;&gt;&#34;sass&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;styles/index.scss&#34;&lt;/span&gt;
  &lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Node.js &lt;code&gt;pkg:&lt;/code&gt; importer supports the full range of &lt;code&gt;&amp;quot;exports&amp;quot;&lt;/code&gt; features, so
you can also specify different locations for different subpaths:&lt;/p&gt;
&lt;pre class=&#34;language-json&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;&lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
  &lt;span class=&#34;token property&#34;&gt;&#34;exports&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;token property&#34;&gt;&#34;.&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
      &lt;span class=&#34;token property&#34;&gt;&#34;sass&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;styles/index.scss&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
    &lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
    &lt;span class=&#34;token property&#34;&gt;&#34;./button.scss&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
      &lt;span class=&#34;token property&#34;&gt;&#34;sass&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;styles/button.scss&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
    &lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
    &lt;span class=&#34;token property&#34;&gt;&#34;./accordion.scss&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
      &lt;span class=&#34;token property&#34;&gt;&#34;sass&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;styles/accordion.scss&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
    &lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;
  &lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;...or even patterns:&lt;/p&gt;
&lt;pre class=&#34;language-json&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;&lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
  &lt;span class=&#34;token property&#34;&gt;&#34;exports&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;token property&#34;&gt;&#34;.&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
      &lt;span class=&#34;token property&#34;&gt;&#34;sass&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;styles/index.scss&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
    &lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
    &lt;span class=&#34;token property&#34;&gt;&#34;./*.scss&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token punctuation&#34;&gt;{&lt;/span&gt;
      &lt;span class=&#34;token property&#34;&gt;&#34;sass&#34;&lt;/span&gt;&lt;span class=&#34;token operator&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;token string&#34;&gt;&#34;styles/*.scss&#34;&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
    &lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;token punctuation&#34;&gt;,&lt;/span&gt;
  &lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;token punctuation&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
</feed>
