Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos in contrast docs #216

Merged
merged 2 commits into from
Sep 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/contrast.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ It is commonly used in lighting design,
and also to examine small, sharp edged symbols and text
on larger, uniformly-colored backgrounds.

> WC = Y<sub>max</sub> - Y<sub>min</sub> / Y<sub>min</sub>
> WC = (Y<sub>max</sub> - Y<sub>min</sub>) / Y<sub>min</sub>

Any two colors can be used,
and this formula does not care which is the text color and which is the background.
Expand All @@ -85,7 +85,7 @@ Weber contrast is typically used with printed test charts
with positive polarity (black text, white background).
The formula thus can be expressed as:

> WC<sub>pp</sub> = Y<sub>background</sub> - Y<sub>text</sub> / Y<sub>text</sub>
> WC<sub>pp</sub> = (Y<sub>background</sub> - Y<sub>text</sub>) / Y<sub>text</sub>

Hwang and Peli used a modified Weber contrast for
tablet-based, negative polarity testing (white text on black background),
Expand All @@ -95,7 +95,7 @@ and wrote:

The formula for negative polarity is

> WC<sub>np</sub> = Y<sub>text</sub> - Y<sub>background</sub> / Y<sub>text</sub>
> WC<sub>np</sub> = (Y<sub>text</sub> - Y<sub>background</sub>) / Y<sub>text</sub>


## Michelson Contrast
Expand Down Expand Up @@ -209,7 +209,7 @@ _This value is much higher than that in the sRGB standard,
which puts white at 80 cd/m2 and black at 0.2cd/m2,
a relative luminance boost of 0.0025._

> WCAG21 = = (Y<sub>max</sub> + 0.05) / (Y<sub>min</sub> + 0.05)
> WCAG21 = (Y<sub>max</sub> + 0.05) / (Y<sub>min</sub> + 0.05)

Because of it's widespread use,
color.js provides this method, mainly to aid comparison.
Expand Down