Mitől látszik egy jel a képernyőn — és miért nem elég hozzá, hogy a két szín „különböző”. A WCAG-képlet, a vigyazokrad.hu saját, mért palettája, és élő színtévesztés-szimuláció.
What makes a mark visible on a screen — and why it is not enough for two colours to be “different”. The WCAG formula, the measured palette of vigyazokrad.hu, and a live colour-vision-deficiency simulator.
Woran es liegt, dass ein Zeichen auf dem Bildschirm sichtbar ist — und warum es nicht genügt, dass zwei Farben „verschieden“ sind. Die WCAG-Formel, die gemessene Palette von vigyazokrad.hu und eine lebendige Simulation von Farbfehlsichtigkeit.
Egy vészhívó alkalmazás műhelyéből · 2026. szeptember 27. From the workshop of an emergency-call app · 27 September 2026 Aus der Werkstatt einer Notruf-App · 27. September 2026Ez a lap egy konkrét hibából nőtt ki, ami egy vészhívó alkalmazásban élt. Minden szám rajta mérés, nem becslés — és a végén ott vannak a kérdések, amikre nem tudjuk a választ.
This page grew out of one concrete defect that lived inside an emergency-call application. Every number on it is measured, not estimated — and at the end you will find the questions we do not know the answers to.
Diese Seite ist aus einem konkreten Fehler entstanden, der in einer Notruf-Anwendung steckte. Jede Zahl darauf ist gemessen, nicht geschätzt — und am Ende stehen die Fragen, auf die wir die Antwort nicht kennen.
Kürtösi Péter vagyok, és a segítségeteket kérem. Mérnök vagyok, nem színelméleti szakember. Ezt a rendszert idős és rosszul látó embereknek építem, ahol egy nem látható jel nem esztétikai kérdés — ott valaki nem talál segítséget.
Az alábbi hibát nem én vettem észre. Amit itt összeszedtem, az a matematika, amire programozni tudok. Ha valamit rosszul értek belőle, ha van jobb út, vagy ha a 7. pontban feltett négy kérdésre tudtok válaszolni — kérlek szóljatok. Bármelyik megjegyzés többet ér, mint amennyi munkát a válasz kér.
Bármilyen visszajelzést szívesen fogadok — helyesbítést, ellenvéleményt,
irodalmat, vagy csak egy „ez így nem jó”-t.
Kürtösi Péter · peter@vigyazokrad.hu
My name is Péter Kürtösi, and I am asking for your help. I am an engineer, not a colour scientist. I build this system for elderly and visually impaired people, where an invisible mark is not a question of taste — there, somebody fails to find help.
The defect described below was not found by me. What I have assembled here is the mathematics I can program against. If I have misunderstood any of it, if there is a better path, or if you can answer the four questions in section 7 — please tell me. Any remark you make is worth more than the effort it costs you.
Any feedback at all is welcome — a correction, a disagreement, a
reference, or simply “this is wrong”.
Péter Kürtösi · peter@vigyazokrad.hu
Mein Name ist Péter Kürtösi, und ich bitte um Ihre Hilfe. Ich bin Ingenieur, kein Farbwissenschaftler. Ich baue dieses System für ältere und sehbehinderte Menschen — dort ist ein unsichtbares Zeichen keine Geschmacksfrage: dort findet jemand keine Hilfe.
Den unten beschriebenen Fehler habe nicht ich entdeckt. Was ich hier zusammengetragen habe, ist die Mathematik, gegen die ich programmieren kann. Wenn ich etwas davon falsch verstanden habe, wenn es einen besseren Weg gibt, oder wenn Sie die vier Fragen in Abschnitt 7 beantworten können — bitte sagen Sie es mir. Jede Anmerkung ist mehr wert als die Mühe, die sie Sie kostet.
Jede Rückmeldung ist willkommen — eine Korrektur, ein Widerspruch,
ein Literaturhinweis, oder einfach ein „so stimmt das nicht“.
Péter Kürtösi · peter@vigyazokrad.hu
Az alkalmazás főképernyőjén csempék vannak: minden csempe egy ember. A csempe alján egy kis ikon mondta meg, hogy koppintásra hívás indul-e vagy üzenet megy. Az ikon jó színű volt — fényképes csempéken kifogástalanul látszott.
The app’s home screen is a grid of tiles, one person per tile. A small icon at the bottom of each tile told you whether tapping it would place a call or send a message. The icon’s colour was fine — on tiles with a photograph it was perfectly legible.
Der Startbildschirm der App besteht aus Kacheln, eine Person pro Kachel. Ein kleines Symbol am unteren Rand zeigte an, ob ein Tippen einen Anruf auslöst oder eine Nachricht sendet. Die Farbe des Symbols war in Ordnung — auf Kacheln mit einem Foto war es einwandfrei lesbar.
Aztán valaki, aki csak odapillantott a telefonra, ezt mondta:
Then someone who merely glanced at the phone said this:
Dann sagte jemand, der nur kurz auf das Telefon blickte, Folgendes:
„Pont olyan zöld a boríték, mint a csempe háttere. A kutya se látja rajta.”
“The envelope is exactly the same green as the tile behind it. Nobody can see it.”
„Der Umschlag ist genau so grün wie die Kachel dahinter. Das sieht doch kein Mensch.“
A rajzolt avatarok névsávja ugyanis maga is pasztell. Ugyanaz az ikon, ami fényképen kiválóan látszott, ott eltűnt. És amikor megmértük, kiderült, hogy rosszabb a helyzet, mint amit szabad szemmel látni lehetett. Az ikon színe #7FE38A volt:
The name band under an illustrated avatar is itself a pastel. The very same icon that was perfectly visible over a photograph simply disappeared there. And when we measured it, the situation turned out to be worse than the eye suggested. The icon colour was #7FE38A:
Das Namensband unter einem gezeichneten Avatar ist selbst ein Pastellton. Genau dasselbe Symbol, das über einem Foto hervorragend sichtbar war, verschwand dort. Und als wir nachgemessen haben, zeigte sich: es ist schlimmer, als das Auge vermuten ließ. Die Symbolfarbe war #7FE38A:
| avatar-háttér | hex | kontraszt az ikonnal | WCAG 1.4.11 (3:1) |
|---|---|---|---|
| avatar background | hex | contrast with the icon | WCAG 1.4.11 (3:1) |
| Avatar-Hintergrund | Hex | Kontrast zum Symbol | WCAG 1.4.11 (3:1) |
Fényképes csempén ugyanez az ikon 9,92:1-et mért — de azt a számot nem lehet hexből kiszámolni, mert ott a névsáv egy fekete átmenet 78 %-on, és a háttér maga a fénykép. Ezért ez a szám a képernyőn mérve készült, nem a képletből.
Over a photographic tile the same icon measured 9.92:1 — but that number cannot be derived from a hex value, because there the name band is black at 78 % opacity and the backdrop is the photograph itself. That figure was therefore measured on the screen, not computed from the formula.
Über einer Foto-Kachel maß dasselbe Symbol 9,92:1 — diese Zahl lässt sich jedoch nicht aus einem Hex-Wert berechnen, denn dort ist das Namensband Schwarz mit 78 % Deckkraft, und der Hintergrund ist das Foto selbst. Dieser Wert wurde daher am Bildschirm gemessen, nicht aus der Formel errechnet.
A 1,00 nem „gyenge kontraszt”. Az azt jelenti, hogy a két szín fénysűrűsége matematikailag azonos — nulla kontraszt. Nem a szeme csalta meg azt, aki nem látta: tényleg nem volt ott semmi.
A ratio of 1.00 is not “low contrast”. It means the two colours have mathematically identical luminance — zero contrast. The person who could not see it was not imagining things: there genuinely was nothing there.
1,00 ist kein „schwacher Kontrast“. Es bedeutet, dass beide Farben mathematisch dieselbe Leuchtdichte haben — null Kontrast. Wer es nicht sah, hat sich nicht getäuscht: es war tatsächlich nichts da.
A WCAG 2.1 kontraszt-aránya három lépés. Először minden csatornát vissza kell vinni a gammából lineáris fénybe:
The WCAG 2.1 contrast ratio takes three steps. First, each channel is taken back out of gamma into linear light:
Das Kontrastverhältnis nach WCAG 2.1 besteht aus drei Schritten. Zuerst wird jeder Kanal aus dem Gamma zurück in lineares Licht überführt:
s = c / 255
lin = (s <= 0.04045) ? s / 12.92
: ((s + 0.055) / 1.055) ^ 2.4
Aztán a relatív fénysűrűség (relative luminance):
Then the relative luminance:
Dann die relative Leuchtdichte (relative luminance):
L = 0.2126·R_lin + 0.7152·G_lin + 0.0722·B_lin
És végül a kontraszt-arány, a világosabbat felülre téve:
And finally the contrast ratio, lighter colour on top:
Und schließlich das Kontrastverhältnis, die hellere Farbe oben:
CR = (L_lighter + 0.05) / (L_darker + 0.05) // 1:1 … 21:1
function luminance(hex) {
const v = [0, 2, 4].map(i => {
const s = parseInt(hex.slice(i + 1, i + 3), 16) / 255;
return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
});
return 0.2126 * v[0] + 0.7152 * v[1] + 0.0722 * v[2];
}
function contrast(a, b) {
const la = luminance(a), lb = luminance(b);
return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);
}
| mire vonatkozik | WCAG-pont | AA | AAA |
|---|---|---|---|
| what it covers | WCAG criterion | AA | AAA |
| wofür es gilt | WCAG-Kriterium | AA | AAA |
| normál szövegbody textFließtext | 1.4.3 / 1.4.6 | 4,5:14.5:14,5:1 | 7:1 |
| nagy szöveg (≥24 px, vagy ≥18,7 px félkövér)large text (≥24 px, or ≥18.7 px bold)große Schrift (≥24 px, oder ≥18,7 px fett) | 1.4.3 / 1.4.6 | 3:1 | 4,5:14.5:14,5:1 |
| nem-szöveges grafika, kezelőelem, állapotjelnon-text graphics, UI components, state indicatorsNicht-Text-Grafik, Bedienelement, Zustandsanzeige | 1.4.11 | 3:1 | — |
A csempéken lévő ikonok a harmadik sorba tartoznak: nem szöveg, de nélkülük nem érthető a felület. A küszöb tehát 3,0 — és a mért 1,00–1,17 ennek a 33–39 %-a.
The tile icons fall into the third row: not text, but the interface cannot be understood without them. The threshold is therefore 3.0 — and the measured 1.00–1.17 is 33–39 % of that.
Die Kachel-Symbole fallen in die dritte Zeile: kein Text, aber ohne sie ist die Oberfläche nicht verständlich. Der Schwellenwert ist also 3,0 — und die gemessenen 1,00–1,17 sind davon 33–39 %.
Nézze meg a három szorzót a fénysűrűség-képletben:
Look at the three coefficients in the luminance formula:
Sehen Sie sich die drei Koeffizienten in der Leuchtdichte-Formel an:
0.2126 · R 0.7152 · G 0.0722 · B 21 % 72 % 7 %
A színárnyalat (hue) nem szerepel a képletben. Csak a világosság. Ezért lehet két szín szemre jól megkülönböztethető — a mért esetben 59°-kal tér el a színezetük a színkörön —, és a kontraszt-arányuk mégis 1,00. Sőt: a majdnem szemközti rózsa háttéren (139°) is csak 1,05.
Hue does not appear in the formula at all. Only lightness does. That is why two colours can be plainly distinguishable to the eye — in the measured case their hues are 59° apart on the colour wheel — and still have a contrast ratio of 1.00. More than that: on the nearly opposite pink background (139°) it is still only 1.05.
Der Farbton kommt in der Formel überhaupt nicht vor. Nur die Helligkeit. Deshalb können zwei Farben für das Auge deutlich unterscheidbar sein — im gemessenen Fall liegen ihre Farbtöne 59° auseinander auf dem Farbkreis — und trotzdem ein Kontrastverhältnis von 1,00 haben. Mehr noch: Auf dem nahezu gegenüberliegenden Hintergrund Rosa (139°) sind es immer noch nur 1,05.
Ebből következik a szabály, amit programozni lehet: soha ne a színárnyalattal különböztessünk meg két dolgot. Világosság-különbséget kell csinálni. A színárnyalat lehet ráadás, de nem lehet a jelentés hordozója — mert a nézők egy részénél egyszerűen nincs ott.
From which follows a rule you can actually program: never let hue alone distinguish two things. Create a difference in lightness. Hue may carry extra meaning, but it cannot be the carrier of the meaning — because for a share of your viewers it simply is not there.
Daraus folgt eine Regel, die sich tatsächlich programmieren lässt: Niemals allein der Farbton darf zwei Dinge unterscheiden. Es muss ein Helligkeitsunterschied sein. Der Farbton darf zusätzliche Bedeutung tragen, aber nicht der Träger der Bedeutung sein — denn bei einem Teil der Betrachter ist er schlicht nicht vorhanden.
A javítás is pontosan ezt tette: az ikon nem világosabb zöld lett, hanem sötét korongot kapott fehér jellel. A színárnyalat maradt beszédes (zöld = üzenet, kék = hívás), de a láthatóságot már a világosság-különbség hordozza.
The fix did exactly that: the icon did not become a brighter green — it was given a dark disc with a white glyph. Hue still speaks (green = message, blue = call), but visibility is now carried by the difference in lightness.
Genau das hat die Korrektur getan: Das Symbol wurde nicht heller grün, sondern erhielt eine dunkle Scheibe mit weißem Zeichen. Der Farbton spricht weiterhin (grün = Nachricht, blau = Anruf), aber die Sichtbarkeit trägt jetzt der Helligkeitsunterschied.
Az alapértelmezett érték a valódi hibás pár: az eredeti világoszöld boríték (#7FE38A) a zöld avatar névsávján (#A8D5BA). A két szín szemre teljesen különböző.
The default values are the actual defective pair: the original pale green envelope (#7FE38A) on the green avatar’s name band (#A8D5BA). To the eye the two colours look entirely different.
Die Vorgabewerte sind das tatsächlich fehlerhafte Paar: der ursprüngliche hellgrüne Umschlag (#7FE38A) auf dem Namensband des grünen Avatars (#A8D5BA). Für das Auge sehen die beiden Farben völlig verschieden aus.
A gyakorlatban a Machado, Oliveira & Fernandes (2009) mátrixokat használják — ezekre épül több elterjedt fejlesztői és tervezőeszköz látásszimulációja is. Három 3×3-as mátrix, súlyosság szerint skálázva; itt a teljes (1,0-ás) esetek szerepelnek. A dikromát eseteknek külön hivatkozási alapja van, a Brettel–Viénot–Mollon (1997/99), ami LMS-térben vetít.
In practice the Machado, Oliveira & Fernandes (2009) matrices are what people use — the vision simulation in several widely used developer and design tools is built on them. Three 3×3 matrices, scalable by severity; the full (1.0) cases are used here. Dichromatic cases have a reference of their own, Brettel–Viénot–Mollon (1997/99), which projects in LMS space.
In der Praxis verwendet man die Matrizen von Machado, Oliveira & Fernandes (2009) — auf ihnen beruht die Sehsimulation mehrerer verbreiteter Entwickler- und Design-Werkzeuge. Drei 3×3-Matrizen, nach Schweregrad skalierbar; hier stehen die vollen Fälle (1,0). Für dichromatische Fälle gibt es eine eigene Referenz, Brettel–Viénot–Mollon (1997/99), die im LMS-Raum projiziert.
⚠ Egy részlet, ami sokszor elsikkad: ezek a mátrixok lineáris RGB-ben értendők. Aki közvetlenül az sRGB-értékekre alkalmazza őket, az közel jár, de nem pontos. Ezen a lapon a szimuláció sRGB → lineáris → mátrix → sRGB úton megy.
⚠ One detail that is often missed: these matrices are defined for linear RGB. Applying them straight to sRGB values gets you close, but it is not correct. On this page the simulation goes sRGB → linear → matrix → sRGB.
⚠ Ein Detail, das oft übersehen wird: Diese Matrizen sind für lineares RGB definiert. Wer sie direkt auf sRGB-Werte anwendet, kommt nahe heran, aber es ist nicht korrekt. Auf dieser Seite läuft die Simulation über sRGB → linear → Matrix → sRGB.
Váltson akromatópsziára. A bal oldali ikonok teljesen eltűnnek — a jobb oldaliak ugyanolyan jól látszanak, mint színesben. Ez a legtisztább bizonyíték arra, hogy a jelentést a világosság hordozza, nem a szín.
És figyelje meg azt is, hogy a kontraszt-számok a szimulált módokban alig változnak. Ennek mérhető oka van: az itt szereplő színeken a szimuláció a relatív luminanciát legfeljebb 0,041-dal mozdítja el — a legtöbbet a protanópia, a legkevesebbet a tritanópia (0,014). Ez azonban nem általános törvény: a mátrixok nem luminancia-megőrzők. Ezen a palettán viszont a világosság-viszonyok gyakorlatilag változatlanok, és ezért igaz itt, hogy ami világosságban átmegy, az a színtévesztőknek is átmegy.
Switch to achromatopsia. The icons on the left vanish completely — the ones on the right remain exactly as legible as they are in colour. This is the cleanest possible proof that meaning is carried by lightness, not by hue.
Notice too that the contrast figures barely move between the simulated modes. There is a measurable reason: across the colours used here the simulation shifts relative luminance by at most 0.041 — most under protanopia, least under tritanopia (0.014). This is not a general law: the matrices are not luminance-preserving. On this palette, however, the lightness relations are effectively unchanged, which is why it holds here that whatever passes on lightness also passes for colour-deficient viewers.
Schalten Sie auf Achromatopsie. Die Symbole links verschwinden vollständig — die rechten bleiben genauso gut lesbar wie in Farbe. Das ist der sauberste Beweis dafür, dass die Bedeutung von der Helligkeit getragen wird und nicht von der Farbe.
Beachten Sie auch, dass sich die Kontrastwerte zwischen den simulierten Modi kaum verändern. Dafür gibt es einen messbaren Grund: Über die hier verwendeten Farben verschiebt die Simulation die relative Leuchtdichte um höchstens 0,041 — am meisten bei der Protanopie, am wenigsten bei der Tritanopie (0,014). Das ist allerdings kein allgemeines Gesetz: Die Matrizen sind nicht leuchtdichteerhaltend. Auf dieser Palette bleiben die Helligkeitsverhältnisse jedoch praktisch unverändert, und deshalb gilt hier: Was über die Helligkeit besteht, besteht auch für farbfehlsichtige Betrachter.
| eszköz | hol | mit ad |
|---|---|---|
| tool | where | what it gives |
| Werkzeug | wo | was es liefert |
| Chrome DevTools | ⋮ → More tools → Rendering → Emulate vision deficiencies | protanópia, deuteranópia, tritanópia, akromatópszia, homályos látás, csökkentett kontraszt — bármelyik weblapra protanopia, deuteranopia, tritanopia, achromatopsia, blurred vision, reduced contrast — on any web page Protanopie, Deuteranopie, Tritanopie, Achromatopsie, unscharfes Sehen, verringerter Kontrast — auf jeder Webseite |
| Android | Fejlesztői beállítások → Színtér szimulálásaDeveloper options → Simulate colour spaceEntwickleroptionen → Farbraum simulieren | deuteranomália / protanomália / tritanomália — a valódi appon, valódi telefonon deuteranomaly / protanomaly / tritanomaly — on the real app, on a real phone Deuteranomalie / Protanomalie / Tritanomalie — in der echten App, auf einem echten Telefon |
| Color Oracle | colororacle.org | teljes képernyős szimuláció, Win/Mac/Linux, ingyenes full-screen simulation, Win/Mac/Linux, free Vollbild-Simulation, Win/Mac/Linux, kostenlos |
| Sim Daltonism | macOS | mozgatható „lencse” a képernyőn a movable “lens” you drag around the screen eine verschiebbare „Lupe“ über dem Bildschirm |
Becsületesnek kell lenni: a fenti képlet ismerten pontatlan. Leginkább sötét háttéren és a középtónusokban tér el attól, amit az ember ténylegesen lát — a +0,05 tag egy egyszerűsítés, ami a sötét oldalon torzít.
Honesty requires saying it: the formula above is known to be inaccurate. It diverges most from what people actually see on dark backgrounds and in the midtones — the +0.05 term is a simplification that distorts the dark end.
Ehrlichkeit verlangt, es zu sagen: Die obige Formel ist bekanntermaßen ungenau. Am stärksten weicht sie auf dunklen Hintergründen und in den Mitteltönen von dem ab, was Menschen tatsächlich sehen — der Term +0,05 ist eine Vereinfachung, die das dunkle Ende verzerrt.
Az utódja az APCA (Accessible Perceptual Contrast Algorithm), a WCAG 3 tervezetében. Az modellezi a polaritást is: a sötét-világoson és a világos-sötéten nem ugyanaz, és nem egy arányszámot ad, hanem egy Lc értéket nagyjából −108 … +106 között.
Its successor is APCA (Accessible Perceptual Contrast Algorithm), in the WCAG 3 draft. It models polarity as well — dark-on-light and light-on-dark are not the same case — and returns not a ratio but an Lc value roughly between −108 and +106.
Ihr Nachfolger ist APCA (Accessible Perceptual Contrast Algorithm), im Entwurf von WCAG 3. Er modelliert auch die Polarität — dunkel-auf-hell und hell-auf-dunkel sind nicht derselbe Fall — und liefert kein Verhältnis, sondern einen Lc-Wert etwa zwischen −108 und +106.
Ami ma normatív — amire hivatkozni lehet egy áruházi adatlapon, egy pályázatban vagy egy szimpóziumon —, az a WCAG 2.1. Tehát arra programozunk. Az APCA-t ismerjük, és ahol többet mond, ott figyelünk rá — de a megfelelőséget a 2.1 adja.
What is normative today — what you can cite on a store listing, in a tender, or at a conference — is WCAG 2.1. So that is what we program against. We know APCA, and where it tells us more we listen — but conformance is stated in 2.1.
Normativ ist heute — und zitierfähig in einem Store-Eintrag, einer Ausschreibung oder auf einer Tagung — WCAG 2.1. Dagegen programmieren wir also. APCA kennen wir, und wo es mehr sagt, hören wir hin — die Konformität aber erklärt 2.1.
Ezek a valódi kérdéseink — ezekre keressük a választ:
These are our genuine open questions:
Das sind unsere echten offenen Fragen:
Ezt a hibát nem gép találta meg. Nem volt olyan tesztünk, ami elbukott volna rajta — sőt, az ikon a saját tervezési környezetében (sötét fényképen) kifogástalan volt.
This defect was not found by a machine. No test of ours failed on it — indeed, in the environment it was designed for (over a dark photograph) the icon was flawless.
Diesen Fehler hat keine Maschine gefunden. Kein Test von uns ist daran gescheitert — im Gegenteil: In der Umgebung, für die es entworfen war (über einem dunklen Foto), war das Symbol einwandfrei.
Egy ember odapillantott a telefonra, és megmondta. Egy másik, aki maga is nehezen látja a színeket, előtte már jelezte, hogy nem talál semmilyen ikont — és a válasz az volt neki, hogy „ott a kis ikon”.
A person glanced at the phone and said so. Another, who has difficulty with colour himself, had already reported that he could not find any icon at all — and was told “the little icon is right there”.
Ein Mensch warf einen Blick auf das Telefon und sagte es. Ein anderer, der selbst Schwierigkeiten mit Farben hat, hatte zuvor schon gemeldet, dass er überhaupt kein Symbol finde — und bekam zur Antwort: „Das kleine Symbol ist doch da.“
Neki volt igaza, és nem szubjektíven: matematikailag. Ezért kell a képlet — hogy a következőt már ne kelljen valakinek a saját kárán észrevennie.
He was right, and not subjectively: mathematically. That is what the formula is for — so that nobody has to discover the next one the hard way.
Er hatte recht, und zwar nicht subjektiv, sondern mathematisch. Genau dafür ist die Formel da — damit den nächsten Fehler niemand mehr auf eigene Kosten entdecken muss.