### Bug description

Using Quarto 1.3.340 on macOS.

Similar to https://github.com/quarto-dev/quarto-cli/issues/2548

axe DevTools reports inline code and navigation elements as having less than the recommended color contrast.

Currently rendered result:

<img width="1026" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/362187/b3ac6640-ea5e-458d-9019-bc9173f22707">


### Steps to reproduce

````markdown
---
title: style
format:
  html:
    theme: "cosmo"
    toc: true
    toc-expand: true
---

Some examples reported as having color contrast below 4.5.

The `inline code` is given color of `#9753b8` and background of `#f7f7f7`.

The [`inline code link`](https://quarto.org) is given a color of `#2780e3`
background of `#f7f7f7`. Reported contrast of 3.71.

## h2 having `inline code`

In the right-hand nav when the active item, it is given a color of `#2780e3`
and background of `#ffffff`. Reported contrast of 3.97.

The h2 inline code is given a color of `#9753b8` and background of `#f7f7f7`.
Perhaps due to the font size, it is not reported as having contrast problems.

### h3 having `inline code`

The h3 inline code is given a color of `#a164bf` and background of `#f8f8f8`.
Reported contrast of 3.88.

#### h4 having `inline code`

The h4 inline code is given a color of `#a164bf` and background of `#f8f8f8`.
Reported contrast of 3.88.
````

### Quarto check output

```
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.340
      Path: /Applications/RStudio.app/Contents/Resources/app/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.6
      Path: /Library/Developer/CommandLineTools/usr/bin/python3
      Jupyter: (None)

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

[✓] Checking R installation...........OK
      Version: 3.6.3
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/3.6/Resources/library
      knitr: 1.42.8
      rmarkdown: 2.20

[✓] Checking Knitr engine render......OK
```
dragonstyle
2023-06-01T15:33:22Z
aronatkins
bug good-first-issue accessibility html
v1.4
closed
failing color contrast for inline code style using "cosmo"
https://github.com/quarto-dev/quarto-cli/issues/5780