Skip to content

Commit

Permalink
Typos: remove duplicate words
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Sep 30, 2024
1 parent d8e8080 commit 790b9f7
Show file tree
Hide file tree
Showing 26 changed files with 53 additions and 53 deletions.
8 changes: 4 additions & 4 deletions coloraide/algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def clamp(
mn: SupportsFloatOrInt | None = None,
mx: SupportsFloatOrInt | None = None
) -> SupportsFloatOrInt:
"""Clamp the value to the the given minimum and maximum."""
"""Clamp the value to the given minimum and maximum."""

if mn is not None and mx is not None:
return max(min(value, mx), mn)
Expand Down Expand Up @@ -1547,7 +1547,7 @@ def __next__(self) -> tuple[float, ...]:
def __iter__(self) -> Iterator[tuple[float, ...]]: # pragma: no cover
"""Iterate."""

# Setup and and return the iterator.
# Setup and return the iterator.
return self


Expand Down Expand Up @@ -1631,7 +1631,7 @@ def __next__(self) -> tuple[float, ...]:
def __iter__(self) -> Broadcast:
"""Iterate."""

# Setup and and return the iterator.
# Setup and return the iterator.
return self


Expand Down Expand Up @@ -2790,7 +2790,7 @@ def solve(a: MatrixLike | TensorLike, b: ArrayLike) -> Array:
of dependent variables.
2. If we have [..., M, M] and [..., M, M] and it we have multiple sets of linear
equations it will be treated as as multiple [M, M] and [M] cases as described in 1).
equations it will be treated as multiple [M, M] and [M] cases as described in 1).
If we have only one set of linear equations, it will be treated as a [..., M, M] and
[..., M, K] case as described in 3).
Expand Down
4 changes: 2 additions & 2 deletions coloraide/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def random(cls, space: str, *, limits: Sequence[Sequence[float] | None] | None =
if limits is None:
limits = []

# Acquire the minimum and maximum for the channel and get a random value value between
# Acquire the minimum and maximum for the channel and get a random value between
length = len(limits)
coords = []
for i in range(num_chan):
Expand Down Expand Up @@ -764,7 +764,7 @@ def split_chromaticity(
if cspace == 'xyz':
raise ValueError('XYZ is not a luminant-chromaticity color space.')

# Convert to the the requested uv color space if required.
# Convert to the requested uv color space if required.
return (
self.convert_chromaticity('xyz', cspace, coords, white=white) if cspace != 'xy_1931' else coords
)
Expand Down
2 changes: 1 addition & 1 deletion coloraide/spaces/cam16_jmh.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Environment:
white: This is the (x, y) chromaticity points for the white point. This should be the same
value as set in the color class `WHITE` value.
adapting_luminance: This is the the luminance of the adapting field. The units are in cd/m2.
adapting_luminance: This is the luminance of the adapting field. The units are in cd/m2.
The equation is `L = (E * R) / π`, where `E` is the illuminance in lux, `R` is the reflectance,
and `L` is the luminance. If we assume a perfectly reflecting diffuser, `R` is assumed as 1.
For the "gray world" assumption, we must also divide by 5 (or multiply by 0.2 - 20%).
Expand Down
2 changes: 1 addition & 1 deletion coloraide/spaces/zcam_jmh.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class Environment:
ref_white: The reference white in XYZ scaled by 100.
adapting_luminance: This is the the luminance of the adapting field. The units are in cd/m2.
adapting_luminance: This is the luminance of the adapting field. The units are in cd/m2.
The equation is `L = (E * R) / π`, where `E` is the illuminance in lux, `R` is the reflectance,
and `L` is the luminance. If we assume a perfectly reflecting diffuser, `R` is assumed as 1.
For the "gray world" assumption, we must also divide by 5 (or multiply by 0.2 - 20%).
Expand Down
2 changes: 1 addition & 1 deletion docs/src/markdown/about/acknowledgments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Acknowledgments

All projects gain help and inspiration from somewhere, and we wanted to document the places in which we we gathered
All projects gain help and inspiration from somewhere, and we wanted to document the places in which we gathered
knowledge, ideas, and help.

## Projects
Expand Down
6 changes: 3 additions & 3 deletions docs/src/markdown/about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
conversion if the algorithm requires it.
- **NEW**: Channels can be accessed by `get` and `set` using their numerical value (as a string input).
- **NEW**: Color space plugins that specify the gamut space via `GAMUT_CHECK` must use that color space as a
reference when when gamut mapping or clipping by default.
reference when gamut mapping or clipping by default.
- **NEW**: New color space plugin attribute `CLIP_SPACE` added which will override the space specified by
`GAMUT_CHECK` to force clipping in the origin space even if a gamut mapping space is defined. This is only used when
it is advantageous to clip in the origin space, e.g. when faster and still practical.
Expand Down Expand Up @@ -536,7 +536,7 @@
imperceptible amount of transparency. If alpha is very close (`#!py3 1e-6`) to being opaque, just round it to
opaque.
- **FIX**: An easing function's output should not be clamped, only the input, and that only **needs** to occur on the
the outer range of an entire interpolation.
outer range of an entire interpolation.

## 1.0

Expand Down Expand Up @@ -625,7 +625,7 @@ a new Bezier interpolation method and added many more color spaces!

- `interpolate` and `steps` functions are now `@classmethod`s. This alleviates the awkward handling of
interpolating colors greater than 2. Before, the first color always had to be an instance and then the rest had
to be fed into that instance, now the the methods can be called from the base class or an instance with all the
to be fed into that instance, now the methods can be called from the base class or an instance with all the
colors fed in via a list. Only the colors in the list will be evaluated during interpolation.
- `Piecewise` object has been removed.
- `stop` objects are used to wrap colors to apply a new color stop.
Expand Down
10 changes: 5 additions & 5 deletions docs/src/markdown/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ In general, ColorAide is careful to provide good round trip conversions where pr
try to maintain a high level of accuracy so that when a color is converted to a different color and back that it will be
very close, if not exactly, the same.

In general, we are able to keep decent round tripping by not not clipping values during conversion and maintaining as
high a level of precision as we can, but there are some cases where the high level of round trip accuracy cannot be
maintained, or even at all. There are even reasons where we willfully choose to sacrifice some accuracy for convenience
in order to uphold intuitive expectations for the user.
In general, we are able to keep decent round tripping by not clipping values during conversion and maintaining as high a
level of precision as we can, but there are some cases where the high level of round trip accuracy cannot be maintained,
or even at all. There are even reasons where we willfully choose to sacrifice some accuracy for convenience in order to
uphold intuitive expectations for the user.

If you are a color scientist or you work in certain industries, there are definite reasons to uphold accuracy at all
costs, but sometimes, you just want the colors to do the what you expect them to do. ColorAide tries to live in the
Expand Down Expand Up @@ -138,7 +138,7 @@ is with cylindrical color models.
ColorAide aims to make colors easy to use, but the one case that can frustrate users is interpolating with an achromatic
color using a cylindrical color space.

Achromatic colors do not have a hue, but all conversions end up yielding something for hue, even it it has no practical
Achromatic colors do not have a hue, but all conversions end up yielding something for hue, even it has no practical
meaning. This can cause odd color shifts when interpolating with an achromatic color. In order to get logical results
when doing interpolation, we detect when a color is achromatic (or very close to achromatic) and set the hues to
undefined. This helps us to identify achromatic cases and helps us to prevent weird color shifts when interpolating
Expand Down
10 changes: 5 additions & 5 deletions docs/src/markdown/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ Parameters
`colors` | | A list of color strings, [`Color`](#color) objects, dictionaries representing a color, [`stop`](#piecewise) objects, or easing functions.
`space` | `#!py "lab"` | Color space to interpolate in.
`out_space` | `#!py None` | Color space that the new color should be in. If `#!py None`, the return color will be in the same color space as specified by `space`.
`progress` | `#!py None` | An optional function that that allows for custom logic to perform non-linear interpolation.
`progress` | `#!py None` | An optional function that allows for custom logic to perform non-linear interpolation.
`hue` | `#!py "shorter"` | Define how color spaces which have hue angles are interpolated. Default evaluates between the shortest angle.
`premultiplied` | `#!py True` | Use premultiplied alpha when interpolating.
`extrapolate` | `#!py False` | Interpolations should extrapolate when values exceed the domain range ([0, 1] by default).
Expand Down Expand Up @@ -1003,7 +1003,7 @@ Description

- Interpolates between two colors returning a color that represents the mixing of the base color and the provided
`color` mixed at the provided `percent`, where `percent` applies to how much the provided `color` contributes to the
the final result.
final result.

Parameters

Expand All @@ -1012,7 +1012,7 @@ Parameters
-------------------------- | ---------------------------------- | -----------
`color` | | A color string, [`Color`](#color) object, or dictionary representing a color.
`percent` | `#!py 0.5` | A numerical value between 0 - 1 representing the percentage at which the parameter `color` will be mixed.
`in_place` | `#!py False` | Boolean used to determine if the the current color should be modified "in place" or a new [`Color`](#color) object should be returned.
`in_place` | `#!py False` | Boolean used to determine if the current color should be modified "in place" or a new [`Color`](#color) object should be returned.
`#!py **interpolate_args` | See\ [`interpolate`](#interpolate) | Keyword arguments defined in [`interpolate`](#interpolate).

Return
Expand Down Expand Up @@ -1113,7 +1113,7 @@ Parameters
`name` | | The name of the filter that should be applied.
`amount` | See\ above | A numerical value adjusting to what degree the filter is applied. Input range can vary depending on the filter being used. Default can also dependent on the filter being used.
`space` | `#!py3 None` | Controls the algorithm used for simulating the given CVD.
`in_place` | `#!py3 False` | Boolean used to determine if the the current color should be modified "in place" or a new [`Color`](#color) object should be returned.
`in_place` | `#!py3 False` | Boolean used to determine if the current color should be modified "in place" or a new [`Color`](#color) object should be returned.
`out_space` | `#!py None` | Color space that the new color should be in. If `#!py None`, the return color will be in the same color space as specified via `space`.
`**kwargs` | | Additional filter specific parameters.

Expand Down Expand Up @@ -1237,7 +1237,7 @@ Parameters
`operator` | `#!py3 None` | A Porter Duff operator to use for alpha compositing. Values should be a string specifying the name of the operator to use. If `#!py None`, [`source-over`](#source-over) will be used. If `#!py False`, alpha compositing will be skipped.
`space` | `#!py3 None` | A color space to perform the overlay in. If `#!py None`, the base color's space will be used.
`out_space` | `#!py None` | Color space that the new color should be in. If `#!py None`, the return color will be in the same color space as specified by `space`.
`in_place` | `#!py3 False` | Boolean used to determine if the the current color should be modified "in place" or a new [`Color`](#color) object should be returned.
`in_place` | `#!py3 False` | Boolean used to determine if the current color should be modified "in place" or a new [`Color`](#color) object should be returned.

Return

Expand Down
2 changes: 1 addition & 1 deletion docs/src/markdown/cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Row([color_d50, color_d65])
```

In order to account for the differences in illuminants, we use chromatic adaptation to modify the chromaticities of the
color so that that they account for the different illuminant and appear as they should under the new light source. This
color so that they account for the different illuminant and appear as they should under the new light source. This
happens automatically when we do call `convert()`. We can see that the white point gets adjusted such that the D50 white
looks like the D65 white when in sRGB and D65 white looks like D50 white under Pro Photo.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/markdown/color.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ If you'd like to generate a random color, simply call `Color.random` with a give

Ranges are based on the color space's defined channel range. For color spaces with defined gamuts, the values will be
confined to appropriate ranges. For color space's without defined gamuts, the ranges may be quite arbitrary in some
cases. For color spaces with no hard, defined gamut, or gamuts that that far exceed practical usage it is recommend to
fit the colors to whatever gamut you'd like, or simply use a target space with a clear defined gamut.
cases. For color spaces with no hard, defined gamut, or gamuts that far exceed practical usage it is recommend to fit
the colors to whatever gamut you'd like, or simply use a target space with a clear defined gamut.

```py play
Color.random('lab').fit('srgb')
Expand Down
2 changes: 1 addition & 1 deletion docs/src/markdown/colors/cam16_jmh.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Viewing\ Conditions | Description
---------------------- | -----------
White | This is the white point and should be the same as defined in the color class. This is provided as (x, y) chromaticity coordinates.
Adapting\ Luminance | The luminance of the adapting field (`La`). The units are in cd/m2.
Background\ Luminance | The background luminance (`Yb`) the relative luminance of the nearby background (out to 10°), relative to the the reference white's luminance (`Y`). Usually 20 providing a gray world assumption.
Background\ Luminance | The background luminance (`Yb`) the relative luminance of the nearby background (out to 10°), relative to the reference white's luminance (`Y`). Usually 20 providing a gray world assumption.
Surround | A description of the peripheral area. Use "dark" for a movie theater, "dim" for e.g. viewing a bright television in a dimly lit room, or "average" for surface colors.
Discounting | Discounts the illuminant. If true, the eye is assumed to be fully adapted to the illuminant. Otherwise, the degree of discounting is based on other parameters. When the eye is not fully adapted, it can affect the way colors appear and the chromatic response.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/markdown/colors/zcam_jmh.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Viewing\ Conditions | Description
White | This is the white point and output white and should be the same as defined in the color class. This is provided as (x, y) chromaticity coordinates. ZCAM expects and was designed for this to be D65.
Reference\ White | The absolute reference white where `Yw` is scaled to the luminance.
Adapting\ Luminance | The luminance of the adapting field (`La`). The units are in cd/m2.
Background\ Luminance | The background luminance (`Yb`) the relative luminance of the nearby background (out to 10°), relative to the the reference white's luminance (`Y`). Usually 20 providing a gray world assumption.
Background\ Luminance | The background luminance (`Yb`) the relative luminance of the nearby background (out to 10°), relative to the reference white's luminance (`Y`). Usually 20 providing a gray world assumption.
Surround | A description of the peripheral area. Use "dark" for a movie theater, "dim" for e.g. viewing a bright television in a dimly lit room, or "average" for surface colors.
Discounting | Discounts the illuminant. If true, the eye is assumed to be fully adapted to the illuminant. Otherwise, the degree of discounting is based on other parameters. When the eye is not fully adapted, it can affect the way colors appear and the chromatic response.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/markdown/compositing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ future time.


/// new | New in 4.0
A new `layer` method was added which uses a more intuitive name and aligns with how how multiple colors are handled in
A new `layer` method was added which uses a more intuitive name and aligns with how multiple colors are handled in
other similar APIs such as `average()`, `interpolate()`, etc.
///

Expand Down
2 changes: 1 addition & 1 deletion docs/src/markdown/demos/3d_models.html
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ <h1>ColorAide Color Space Models</h1>
"""
Renders the color space using an RGB cylinder that is then mapped to the given space.

Ideally used to represent cylindrical spaces and will align the the lightness equivalent
Ideally used to represent cylindrical spaces and will align the lightness equivalent
as the Z axis. Lab-ish colors are performed in the mode as they are essentially cylindrical
with the chroma and hue converted to Cartesian a and b.
"""
Expand Down
4 changes: 2 additions & 2 deletions docs/src/markdown/distance.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ users can defer to the ray tracing approach which does not require a special ∆

On occasions, MINDE approach can be slightly more accurate very close to white due to the way ray trace handles HCT's
atypical achromatic response, but differences should be imperceptible to the eye at such lightness levels making the
the improved performance of the ray trace approach much more desirable.
improved performance of the ray trace approach much more desirable.

```py play
c = Color('hct', [325, 24, 50])
Expand Down Expand Up @@ -324,7 +324,7 @@ Color('red').closest(['pink', 'yellow', 'green', 'blue', 'purple', 'maroon'], me
## Configuring Delta E Defaults

A number of distancing algorithms have configurable features that can be set on demand. If you'd like to have these
options set by default, you create a custom class and register the the plugins with the defaults of your choice.
options set by default, you create a custom class and register the plugins with the defaults of your choice.

In this example, we will configure ∆E^\*^~00~ to use CIE Lab D50 instead of D65 by default.

Expand Down
6 changes: 3 additions & 3 deletions docs/src/markdown/gamut.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ colors that the human eye can't even see.
![Gamut Comparison](images/gamut-compare.png)

In order to visually represent a color from a wider gamut color space, such as Display P3, in a more narrow color space,
such as sRGB, a suitable color within the more narrow color space must must be selected and be shown in its place. This
such as sRGB, a suitable color within the more narrow color space must be selected and be shown in its place. This
selecting of a suitable replacement is called gamut mapping.

ColorAide defines a couple methods to help identify when a color is outside the gamut bounds of a color space and to
Expand Down Expand Up @@ -393,7 +393,7 @@ a special ∆E method.

On occasions, MINDE approach can be slightly more accurate very close to white due to the way ray trace handles HCT's
atypical achromatic response, but differences should be imperceptible to the eye at such lightness levels making the
the improved performance of the ray trace approach much more desirable.
improved performance of the ray trace approach much more desirable.

```py play
c = Color('hct', [325, 24, 50])
Expand Down Expand Up @@ -473,7 +473,7 @@ is selected is the first one encountered when following the ray from the origin
end point.
///

The intersection of the line and the gamut surface represents an approximation of the the most saturated color for that
The intersection of the line and the gamut surface represents an approximation of the most saturated color for that
lightness and hue, but because the RGB space is not perceptual, the initial approximation is likely to be off because
decreasing chroma and holding lightness and hue constant in a perceptual space will create a curved path through the
RGB space. In order to converge on a point as close as possible to the actual most saturated color with the given hue
Expand Down
Loading

0 comments on commit 790b9f7

Please sign in to comment.