Skip to content
quarry Artifact [5ab1e223e3]
Login

Artifact [5ab1e223e3]

Artifact 5ab1e223e3d6b3cca8fdfff6ba41d7d5d70f9e2e40fbfaf9f88c34fbb9a5505b:


package theme

import "testing"

// Muted text is secondary: in every theme it stands out from the page
// less than the body text does, or it ranks nothing. Seven themes had a
// "muted" as strong as their text, GitHub light's darker than it (jva,
// 2026-10-31).
func TestMutedIsQuieterThanTheText(t *testing.T) {
	for _, th := range All {
		bg, fg, mu := th.Value("--bg"), th.Value("--fg"), th.Value("--muted")
		if bg == "" || fg == "" || mu == "" {
			continue
		}
		if Contrast(mu, bg) >= Contrast(fg, bg) {
			t.Errorf("FAIL: %s: muted %s stands out as much as text %s on %s", th.ID, mu, fg, bg)
		}
	}
}