@opencode/ui: v2-text-text-faint and light v2-state-fg-warning fall below WCAG AA 4.5:1 contrast

Aperta Adatta ai principianti
#65,923 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@KhadeerBasha1232 ci sta già lavorando.

Dal 24/11/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css, typescript

Direzione di ricerca

Inizia con le definizioni dei token in packages/ui/src/styles/tokens/colors.css e theme.css, poi traccia come packages/ui/src/theme/v2/default-primitives.ts e mapping.ts espongono gli stessi valori. Calcola la luminanza relativa WCAG per i grigi e il giallo candidati rispetto ai token di sfondo elencati sia in modalità chiara sia scura prima di modificare. Fatto significa che --v2-text-text-faint in chiaro/scuro e --v2-state-fg-warning in chiaro raggiungono almeno 4.5:1 sulle superfici previste, mantenendo sincronizzati i valori rispecchiati nei file di tema TS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

status/repro-plausible

In @opencode/ui's v2 tokens (packages/ui/src/styles/tokens/colors.css and packages/ui/src/styles/tokens/theme.css, plus packages/ui/src/theme/v2/default-primitives.ts and packages/ui/src/theme/v2/mapping.ts), three text colour pairings fall below the WCAG 2.1 AA 4.5:1 contrast target for normal-sized text:

  1. Light --v2-text-text-faint (var(--v2-grey-600), #808080)

    • on --v2-background-bg-base (#ffffff): 3.95:1
    • on --v2-background-bg-layer-01 (#fafafa): 3.78:1
    • on --v2-background-bg-layer-02 (#f2f2f2): 3.53:1
    • on --v2-background-bg-layer-03 (#eeeeee): 3.40:1
  2. Dark --v2-text-text-faint (var(--v2-grey-600), #808080)

    • on --v2-background-bg-base (#161616): 4.58:1 (passes on bg-base)
    • on --v2-background-bg-layer-01 (#242424): 3.93:1
    • on --v2-background-bg-layer-02 (#2e2e2e): 3.44:1
    • on --v2-background-bg-layer-03 (#3a3a3a): 2.88:1
  3. Light --v2-state-fg-warning (var(--v2-yellow-800), #cb9f34)

    • on --v2-state-bg-warning (var(--v2-yellow-100), #fefaec): 2.35:1
    • on --v2-background-bg-base (#ffffff): 2.46:1
    • on --v2-background-bg-layer-01 (#fafafa): 2.35:1
    • on --v2-background-bg-layer-02 (#f2f2f2): 2.19:1

All ratios are computed with the WCAG 2.1 relative-luminance formula. Raising --v2-text-text-faint (light and dark) and light --v2-state-fg-warning to meet the 4.5:1 AA target on their intended surfaces will bring both @opencode/ui and downstream themes that mirror these tokens (such as rune-theme-opencode) up to AA contrast.

Context: https://github.com/anomalyco/rune/issues/289

Lingua principale
TypeScript
Stelle
228k
Fork
31k
Merge medio
3h 22m
PR unite (30g)
476

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anomalyco/opencode

Tutte le issue di anomalyco/opencode

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.