quarto-dev / quarto-dev/quarto-cli

Cannot use `oklch` to specify theme colors

Open
#13,304 6 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Aug 30, 2025.

bug themes upstream
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

I have:
  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide
Bug description

I'm trying to use CSS colors specified using oklch, but when I do there is a Sass compilation error.

Steps to reproduce

When specify a color in theme.scss like:

$body-bg: oklch(0.950 0.055 122.0);
Actual behavior

This produces errors when attempting to preview or render the website:

Error: $color2: To use color.mix() with non-legacy color oklch(95% 0.055 122deg), you must provide a $method.
     ╷
1439 │   $table-group-separator-color: mix(
     │ ┌───────────────────────────────^
1440 │ │   if(variable-exists(body-color), $body-color, $gray-900),
1441 │ │   $body-contrast-bg,
1442 │ │   50%
1443 │ │ ) !default;
     │ └─^
Expected behavior

The website would preview or render.

Your environment
$ quarto --version
1.7.33
Quarto check output
$ quarto check
Quarto 1.7.33
[✓] Checking environment information...
      Quarto cache location: /Users/rusty/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.85.1: OK
      Deno version 1.46.3: OK
      Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.7.33
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.04
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/rusty/Library/TinyTeX/bin/universal-darwin
      Version: 2024

[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
      Source: MacOS known location

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.13.7
      Path: /opt/homebrew/opt/python@3.13/bin/python3.13
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

      There is an unactivated Python environment in .venv. Did you forget to activate it?

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.