Skip to content

Commit

Permalink
Spelling (#191)
Browse files Browse the repository at this point in the history
Co-authored-by: Lea Verou <lea@verou.me>
  • Loading branch information
jsoref and LeaVerou committed Jul 5, 2022
1 parent cb56bdc commit 76e66e1
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All of the above also have `build` versions (e.g. `npm run build:js` or `npm run

Please install an ESLint plugin for your editor. There is an `.eslintrc.json` file in the repo which encodes most of the coding style of the project.

Here are a few other guideliines that cannot be enforced via ESLint:
Here are a few other guidelines that cannot be enforced via ESLint:

- When you define a function, use a space between the opening paren and its name. That way we can search for "functionName (" and find its definition immediately, instead of having to wade through calls to the function.
- Prefer single-word names over multi-word names. 3+ word names are especially frowned upon.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Color.js: Let’s get serious about color

- [Offical website](https://colorjs.io)
- [Official website](https://colorjs.io)
- [Contribution guide](CONTRIBUTING.md)

Features:
Expand Down
2 changes: 1 addition & 1 deletion api/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
"name": "parse",
"static": true,
"role": "function",
"description": "Parse a string as a color. Understands all [CSS Color 4](https://w3.org/TR/css-color-4) functions. Uses the DOM if present to parse hex colors and color names, so that will not not available in non-DOM environments such as Node.js.",
"description": "Parse a string as a color. Understands all [CSS Color 4](https://w3.org/TR/css-color-4) functions. Uses the DOM if present to parse hex colors and color names, so that will not available in non-DOM environments such as Node.js.",
"argument": [
{
"name": "str",
Expand Down
8 changes: 4 additions & 4 deletions docs/adaptation.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ let color = new Color("rebeccapurple");
Invented by Lam at the University of Bradford,
this method uses modified (sharpened) cone responses
with less overlap between the three cone types.
While this doesn't represent the actual physilogical responses,
While this doesn't represent the actual physiological responses,
it does give better predictive accuracy.
The originally published CAT also incorporated
a correction for the non-linear resonse of the
a correction for the non-linear response of the
short wavelength ("blue") cone.
Later studies found that this correction
did not significantly improve accuracy,
Expand Down Expand Up @@ -166,7 +166,7 @@ At the close of the 20th century,
the International Lighting Commission (CIE)
came up with a _color appearance model_
which used a modified form of the original, non-linear Bradford CAT.
It has since been superceeded by later models
It has since been superseded by later models
which are more accurate,
easier to calculate,
and more numerically stable.
Expand Down Expand Up @@ -212,7 +212,7 @@ CAT16 defines both a one-stage and a two-stage CAT;
in the latter, colors are first adapted to an equal-energy white
and then to the destination white in a second step.
We have only implemented the one-stage CAT,
which gived idential results for full adaptation.
which gived identical results for full adaptation.

## Using CATs

Expand Down
4 changes: 2 additions & 2 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ frequently in CSS. This page is all about that.
## Getting a string representation of a color

`color.toString()` is a swiss army knife for many of your serialization needs.
In fact, you may have used it without knowing, since Javascript calls it implicitly with no params when you coerce an object to a string:
In fact, you may have used it without knowing, since JavaScript calls it implicitly with no params when you coerce an object to a string:

```js
let magenta = new Color("srgb", [1, 0, .4]);
Expand Down Expand Up @@ -120,7 +120,7 @@ cssColor.color.inGamut();
```

Note: While `color.toString()` returns a primitive string in most cases, when `fallback` is used it returns a `String` object
so that it can have a property (primitives in Javascript cannot have properties).
so that it can have a property (primitives in JavaScript cannot have properties).
In that case, it will return a `String` object **even if it didn't need to actually use a fallback color**

## Creating a CSS gradient from a range
Expand Down
2 changes: 1 addition & 1 deletion src/CATs.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Object.assign(WHITES, {
// Equal-energy illuminant, used in two-stage CAT16
E: [1.00000, 1.00000, 1.00000],

// The F series of illuminants represent flourescent lights
// The F series of illuminants represent fluorescent lights
F2: [0.99186, 1.00000, 0.67393],
F7: [0.95041, 1.00000, 1.08747],
F11: [1.00962, 1.00000, 0.64350],
Expand Down
2 changes: 1 addition & 1 deletion src/spaces/srgb-linear.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const toXYZ_M = [
];

// This matrix is the inverse of the above;
// again it agrees with the official definiton when rounded to 8 decimal places
// again it agrees with the official definition when rounded to 8 decimal places
const fromXYZ_M = [
[ 3.2409699419045226, -1.537383177570094, -0.4986107602930034 ],
[ -0.9692436362808796, 1.8759675015077202, 0.04155505740717559 ],
Expand Down
3 changes: 2 additions & 1 deletion tests/adapt.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ <h1>Chromatic adaptation tests</h1>
<section>
<h1>Bradford D50 ⇔ D65</h1>
<p>These test the linear Bradford adaptations from CATs.js against the built-in
conversion matricies to interconvert between D50 and D65.</p>
conversion matrices to interconvert between D50 and D65.</p>

<table class="reftest" data-test="numbers">
<tr title="D50 to D65">
<td>
Expand Down
12 changes: 6 additions & 6 deletions tests/delta.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h1>DeltaE 76</h1>
</td>
<td>0.4966</td>
</tr>
<tr title="Pythagoream 3,4,5 triangle">
<tr title="Pythagorean 3,4,5 triangle">
<td>lab(50% 30 40)</td>
<td>lab(50% 0 0)</td>
<td>
Expand Down Expand Up @@ -165,7 +165,7 @@ <h1>DeltaE CMC(2:1)</h1>
</td>
<td>0.7780</td>
</tr>
<tr title="Pythagoream 3,4,5 triangle">
<tr title="Pythagorean 3,4,5 triangle">
<td>lab(50% 30 40)</td>
<td>lab(50% 0 0)</td>
<td>
Expand Down Expand Up @@ -266,7 +266,7 @@ <h1>DeltaE 2000</h1>
</td>
<td>0.4966</td>
</tr>
<tr title="Pythagoream 3,4,5 triangle">
<tr title="Pythagorean 3,4,5 triangle">
<td>lab(50% 30 40)</td>
<td>lab(50% 0 0)</td>
<td>
Expand Down Expand Up @@ -613,7 +613,7 @@ <h1>DeltaE ITP</h1>
</td>
<td>0.4966</td>
</tr>
<tr title="Pythagoream 3,4,5 triangle">
<tr title="Pythagorean 3,4,5 triangle">
<td>lab(50% 30 40)</td>
<td>lab(50% 0 0)</td>
<td>
Expand Down Expand Up @@ -951,7 +951,7 @@ <h1>DeltaE Jz</h1>
</td>
<td>0.00048</td>
</tr>
<tr title="Pythagoream 3,4,5 triangle">
<tr title="Pythagorean 3,4,5 triangle">
<td>color(jzazbz 0.1 0.03 0.04)</td>
<td>color(jzazbz 0.1 0 0)</td>
<td>
Expand Down Expand Up @@ -1046,7 +1046,7 @@ <h1>DeltaE OK</h1>
</td>
<td>0.001343</td>
</tr>
<tr title="Pythagoream 3,4,5 triangle">
<tr title="Pythagorean 3,4,5 triangle">
<td>lab(50% 30 40)</td>
<td>lab(50% 0 0)</td>
<td>
Expand Down

0 comments on commit 76e66e1

Please sign in to comment.