diff --git a/coloraide/algebra.py b/coloraide/algebra.py index 41fc6425..ebc0f439 100644 --- a/coloraide/algebra.py +++ b/coloraide/algebra.py @@ -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) @@ -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 @@ -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 @@ -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). diff --git a/coloraide/color.py b/coloraide/color.py index e48d66b6..b9e18dbb 100644 --- a/coloraide/color.py +++ b/coloraide/color.py @@ -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): @@ -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 ) diff --git a/coloraide/spaces/cam16_jmh.py b/coloraide/spaces/cam16_jmh.py index c1f2879a..cfa47f5a 100644 --- a/coloraide/spaces/cam16_jmh.py +++ b/coloraide/spaces/cam16_jmh.py @@ -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%). diff --git a/coloraide/spaces/zcam_jmh.py b/coloraide/spaces/zcam_jmh.py index d8990cb7..0d7310ae 100644 --- a/coloraide/spaces/zcam_jmh.py +++ b/coloraide/spaces/zcam_jmh.py @@ -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%). diff --git a/docs/src/markdown/about/acknowledgments.md b/docs/src/markdown/about/acknowledgments.md index 298ecab8..1a749e58 100644 --- a/docs/src/markdown/about/acknowledgments.md +++ b/docs/src/markdown/about/acknowledgments.md @@ -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 diff --git a/docs/src/markdown/about/changelog.md b/docs/src/markdown/about/changelog.md index a96cc571..2dcf3667 100644 --- a/docs/src/markdown/about/changelog.md +++ b/docs/src/markdown/about/changelog.md @@ -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. @@ -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 @@ -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. diff --git a/docs/src/markdown/advanced.md b/docs/src/markdown/advanced.md index 19395eb9..72da7031 100644 --- a/docs/src/markdown/advanced.md +++ b/docs/src/markdown/advanced.md @@ -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 @@ -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 diff --git a/docs/src/markdown/api/index.md b/docs/src/markdown/api/index.md index eaae131a..5fc6f658 100644 --- a/docs/src/markdown/api/index.md +++ b/docs/src/markdown/api/index.md @@ -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). @@ -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 @@ -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 @@ -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. @@ -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 diff --git a/docs/src/markdown/cat.md b/docs/src/markdown/cat.md index 4c10c30e..24269499 100644 --- a/docs/src/markdown/cat.md +++ b/docs/src/markdown/cat.md @@ -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. diff --git a/docs/src/markdown/color.md b/docs/src/markdown/color.md index c77b56f7..acbce308 100644 --- a/docs/src/markdown/color.md +++ b/docs/src/markdown/color.md @@ -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') diff --git a/docs/src/markdown/colors/cam16_jmh.md b/docs/src/markdown/colors/cam16_jmh.md index 5f54ef77..1278aefa 100644 --- a/docs/src/markdown/colors/cam16_jmh.md +++ b/docs/src/markdown/colors/cam16_jmh.md @@ -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. diff --git a/docs/src/markdown/colors/zcam_jmh.md b/docs/src/markdown/colors/zcam_jmh.md index cb83eda3..aadcdac8 100644 --- a/docs/src/markdown/colors/zcam_jmh.md +++ b/docs/src/markdown/colors/zcam_jmh.md @@ -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. diff --git a/docs/src/markdown/compositing.md b/docs/src/markdown/compositing.md index 3c8fdffc..5d22ccbd 100644 --- a/docs/src/markdown/compositing.md +++ b/docs/src/markdown/compositing.md @@ -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. /// diff --git a/docs/src/markdown/demos/3d_models.html b/docs/src/markdown/demos/3d_models.html index d32ff299..f2cc2735 100644 --- a/docs/src/markdown/demos/3d_models.html +++ b/docs/src/markdown/demos/3d_models.html @@ -481,7 +481,7 @@

ColorAide Color Space Models

""" 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. """ diff --git a/docs/src/markdown/distance.md b/docs/src/markdown/distance.md index a81cb3d9..bd13db0d 100644 --- a/docs/src/markdown/distance.md +++ b/docs/src/markdown/distance.md @@ -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]) @@ -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. diff --git a/docs/src/markdown/gamut.md b/docs/src/markdown/gamut.md index 6c2b5ce6..84606654 100644 --- a/docs/src/markdown/gamut.md +++ b/docs/src/markdown/gamut.md @@ -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 @@ -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]) @@ -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 diff --git a/docs/src/markdown/index.md b/docs/src/markdown/index.md index e759623d..98a5c9b3 100644 --- a/docs/src/markdown/index.md +++ b/docs/src/markdown/index.md @@ -29,7 +29,7 @@ ColorAide particularly has a focus on the following: - [x] Allow users to configure defaults to their liking. ColorAide is not meant to be the _one_ library to replace all other color libraries. There are many great libraries out -there such such as: [Colour Science][colour-science], [Colorio][colorio], [Python Color Math][color-math], and many +there such as: [Colour Science][colour-science], [Colorio][colorio], [Python Color Math][color-math], and many others. Some focus on the scientific aspects of colors and provide a wealth of various spaces, illuminants, access to complex color space visualizers, and numerous esoteric tools. Some are highly focused on speed. Some are powerful, but can be more complex to pick up by the average user. diff --git a/docs/src/markdown/interpolation.md b/docs/src/markdown/interpolation.md index adfec8af..af14cada 100644 --- a/docs/src/markdown/interpolation.md +++ b/docs/src/markdown/interpolation.md @@ -65,7 +65,7 @@ i = Color.interpolate( /// While ColorAide supports CSS color syntax, it's goal is not to necessarily mirror CSS in all aspects, though often we -do provide ways ways to emulate the behavior. +do provide ways to emulate the behavior. The default linear interpolation that ColorAide uses by default deviates from how CSS handles interpolation. More specifically, it deviates in how undefined hues are resolved during the interpolation steps which directly affects @@ -308,10 +308,10 @@ So far, we've only shown examples of continuous interpolation methods. To clarif slightly different way than we discussed [earlier](#continuous-interpolation). When we say "continuous" here, we simply mean that the colors in the interpolation smoothly transition from one color to the other. But when creating charts or graphs, some times you'd like to categorize data such that a range of values correspond to a specific color. For this, -we can use `discrete`, which like `intrpolate`, returns an interpolation object, but the the ranges will be discrete. +we can use `discrete`, which like `intrpolate`, returns an interpolation object, but the ranges will be discrete. By default, ranges are calculated directly form the input colors. So if you had three colors, the interpolation would be -broken up into 3 ranges. Compare this with the the "continuous" interpolation we methods we showed earlier. +broken up into 3 ranges. Compare this with the "continuous" interpolation we methods we showed earlier. ```py play Color.discrete(['red', 'green', 'blue']) @@ -442,7 +442,7 @@ In general, achromatic colors cannot have an arc length between them and other c between an achromatic color (or a color which simply does not define the hue), the applied hue fix-up will have little effect. With that said, when using [CSS linear interpolation](#css-linear-interpolation), the algorithm is a little different and it essentially creates pseudo arcs between color pairs with undefined hues and defined hues. Only with the -`longer` hue fix-up does this become apparent. Below we compare CSS linear interpolation to our our default linear +`longer` hue fix-up does this become apparent. Below we compare CSS linear interpolation to our default linear interpolation. /// tab | CSS Longer Interpolation @@ -612,7 +612,7 @@ Color.steps( `steps` uses the color class's default ∆E method to calculate max ∆E, the current default ∆E being ∆E^\*^~ab~. While using something like ∆E^\*^~00~ is far more accurate, it is a much more expensive operation. If desired, the class's -default ∆E can be changed via subclassing the color object and and changing `DELTA_E` class variable or by manually +default ∆E can be changed via subclassing the color object and changing `DELTA_E` class variable or by manually specifying the method via the `delta_e` parameter. @@ -705,7 +705,7 @@ aforementioned easing function except `linear`, which simply returns what is giv /// /// details-tip | More Common Cubic Bezier Easings -The following were all acquired from from https://matthewlein.com/tools/ceaser.js. +The following were all acquired from https://matthewlein.com/tools/ceaser.js. ```py ease_in_quad = cubic_bezier(0.550, 0.085, 0.680, 0.530) diff --git a/docs/src/markdown/plugins/cat.md b/docs/src/markdown/plugins/cat.md index 7cec938f..6a718f51 100644 --- a/docs/src/markdown/plugins/cat.md +++ b/docs/src/markdown/plugins/cat.md @@ -8,7 +8,7 @@ reference white. ## Plugin Class -Plugins are are created by subclassing `#!py3 coloraide.cat.CAT`. +Plugins are created by subclassing `#!py3 coloraide.cat.CAT`. ```py class CAT(Plugin, metaclass=ABCMeta): @@ -21,7 +21,7 @@ class CAT(Plugin, metaclass=ABCMeta): """Adapt a given XYZ color using the provided white points.""" ``` -Once registered, the plugin can then be used via `chromatic_adaptation` by passing its `NAME` via the the `method` +Once registered, the plugin can then be used via `chromatic_adaptation` by passing its `NAME` via the `method` along two white points (as XYZ values): `w1` as the current white point and `w2` as the target white point. It should be noted that `chromatic_adaptation` is not usually directly used by the user, so a more likely approach is diff --git a/docs/src/markdown/plugins/fit.md b/docs/src/markdown/plugins/fit.md index 4cd65883..ed8893f4 100644 --- a/docs/src/markdown/plugins/fit.md +++ b/docs/src/markdown/plugins/fit.md @@ -7,7 +7,7 @@ gamut. All default gamut mapping methods provided by ColorAide are provided via ## Plugin Class -Plugins are are created by subclassing `#!py3 coloraide.gamut.Fit`. +Plugins are created by subclassing `#!py3 coloraide.gamut.Fit`. ```py class Fit(Plugin, metaclass=ABCMeta): diff --git a/docs/src/markdown/plugins/interpolate.md b/docs/src/markdown/plugins/interpolate.md index 95430a32..56e5dc53 100644 --- a/docs/src/markdown/plugins/interpolate.md +++ b/docs/src/markdown/plugins/interpolate.md @@ -7,7 +7,7 @@ plugins. ## Plugin Class -Plugins are are created by subclassing `#!py3 coloraide.interpolate.Interpolate`. +Plugins are created by subclassing `#!py3 coloraide.interpolate.Interpolate`. ```py class Interpolate(Plugin, metaclass=ABCMeta): diff --git a/docs/src/markdown/plugins/space.md b/docs/src/markdown/plugins/space.md index aeda685b..f88ef8cf 100644 --- a/docs/src/markdown/plugins/space.md +++ b/docs/src/markdown/plugins/space.md @@ -30,7 +30,7 @@ class XYZD65(Space): NAME = "xyz-d65" # One or more accepted identifiers that are allowed for the `color(space ...)` format. - # For this this specific color space, both `color(xyz x y z / a)` and `color(xyz-d65 x y z / a)` are accepted. + # For this specific color space, both `color(xyz x y z / a)` and `color(xyz-d65 x y z / a)` are accepted. # As `xyz` is listed first, `xyz` is the default used when printing in this format. SERIALIZE = ("xyz-d65", "xyz") @@ -151,7 +151,7 @@ Color(red).convert(NAME) ``` By default, assuming `COLOR_FORMAT` is `#!py3 True`, color strings will be parsed in the following format, where -`SERIALIZE` is one one of the IDs specified via the `SERIALIZE` plugin property. +`SERIALIZE` is one of the IDs specified via the `SERIALIZE` plugin property. ```py Color('color(SERIALIZE ...)') diff --git a/docs/src/markdown/temperature.md b/docs/src/markdown/temperature.md index b48adb9b..aef07ef4 100644 --- a/docs/src/markdown/temperature.md +++ b/docs/src/markdown/temperature.md @@ -22,9 +22,9 @@ series of experiments in which subjects set the intensities of three colors requ experiments and can be used to calculate a number of things, including the Planckian locus. /// tip | CMFs -It should be noted that there isn't one set set of CMFs. Over the years there have been multiple attempts to come up -with the best CMFs and often done at both 2˚ and 10˚ viewing angles. ColorAide only provides CMFS provided by the CIE -via `coloraide.cmfs`, the CIE 1931 2 Degree Standard Observer being the default as it is still the common approach even +It should be noted that there isn't one set of CMFs. Over the years there have been multiple attempts to come up with +the best CMFs and often done at both 2˚ and 10˚ viewing angles. ColorAide only provides CMFS provided by the CIE via +`coloraide.cmfs`, the CIE 1931 2 Degree Standard Observer being the default as it is still the common approach even though better CMFs have been provided. CMFS | diff --git a/tools/calc_oklab_matrices.py b/tools/calc_oklab_matrices.py index b4ec4e0f..d948894b 100644 --- a/tools/calc_oklab_matrices.py +++ b/tools/calc_oklab_matrices.py @@ -105,7 +105,7 @@ And then ours. Ignoring the authors hue and our hue results for white and the oddly high chroma for the author's achromatic white in Okhsl (both of which are meaningless in an achromatic color), we can see that -that we match quite well up to ~7 digits. +we match quite well up to ~7 digits. ``` # Okhsl diff --git a/tools/gamut_3d_plotly.py b/tools/gamut_3d_plotly.py index 4d306912..91f3ac3f 100644 --- a/tools/gamut_3d_plotly.py +++ b/tools/gamut_3d_plotly.py @@ -278,7 +278,7 @@ def render_space_cyl(fig, space, gamut, resolution, opacity, edges, ecolor, gmap """ 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. """ diff --git a/tools/harmony_diagram.py b/tools/harmony_diagram.py index 4072fbc8..f1bc03ea 100644 --- a/tools/harmony_diagram.py +++ b/tools/harmony_diagram.py @@ -245,7 +245,7 @@ def main(): start = i - 1 end = i - # Ensure we we account for wrapping from 360 to 0 + # Ensure we account for wrapping from 360 to 0 h1 = maximums[start][0] h2 = maximums[end][1] dh = (h1 - h2)