coloraide

A library to aid in using colors

MIT License

Downloads
15.8K
Stars
191
Committers
2

Bot releases are hidden (Show)

coloraide - 2.9

Published by facelessuser about 1 year ago

2.9

  • NEW: Add HWBish mixin class.
  • NEW: Deprecate algebra.no_nan(), algebra.no_nans(), and algebra.is_nan().
  • NEW: When averaging in a cylindrical space, always treat achromatic hues as powerless for better results.
  • NEW: Add experimental support for CSS "powerless" hue handling and carrying-forward in interpolation, both
    disabled by default.
  • FIX: Fix RLAB conversion.
  • FIX: Fix clipping of hues.
  • ENHANCE: Tweaks to some matrix calculations.
  • ENHANCE: Various performance related tweaks.
coloraide - 2.8

Published by facelessuser about 1 year ago

2.8

  • NEW: Add Cubehelix color space.
  • NEW: When precision is set to -1 for string output, double precision (17) will be assumed.
  • ENHANCE: More robust and generally better matrix inverse. Related inverse matrices have been regenerated for
    consistency.
coloraide - 2.7.1

Published by facelessuser about 1 year ago

2.7.1

  • FIX: Fix issue where harmony would convert some colors to cylindrical spaces and not properly consider order
    of channels.
  • FIX: XYB, while Lab like in its default configuration, has such a large disparity in the non-lightness
    components that the ranges for them should not be the same when using percentages.
  • FIX: Lab like space mixins should not try and order a and b like coordinates when calling indexes(), but
    should return them in there current order with lightness first. The meaning of these components can be different
    enough for a given color space to make normalizing their ordered configuration meaningless and alter inherit hue
    direction when processing for harmony.
coloraide - 2.7

Published by facelessuser about 1 year ago

2.7

  • NEW: Add new RYB color space.
  • NEW: Add Regular mixin class for normal, 3 channel color spaces (sRGB, CMY, RYB, etc.).
  • NEW: harmony() can now accept and transform Labish and Regular color spaces to cylindrical spaces.
coloraide - 2.6

Published by facelessuser about 1 year ago

2.6

  • NEW: Add padding parameter to limit color scales when interpolating.
coloraide - 2.5

Published by facelessuser about 1 year ago

2.5

  • NEW: Add new discrete() function that creates a discrete interpolation object.
  • NEW: Deprecate coloraide.algebra.apply function in favor of new vectorize functions.
  • FIX: Fix small typing issue.
  • FIX: Tweaks to Oklab 64 bit matrix precision.
  • FIX: Fix prismatic and cmyk achromatic check logic.
  • FIX: Ensure IPT uses the exact white point as documented in the paper.
  • FIX: Fix various corner cases of algebraic functions and implement some performance improvements.
coloraide - 2.4

Published by facelessuser over 1 year ago

2.4

  • NEW: Add Rec. 709 RGB color space.
  • NEW: Add the 1960 UCS color space.
  • NEW: Add correlated color temperature support with new cct() and blackbody() API.
  • NEW: Add support for Robertson 1968 and Ohno 2013 CCT plugins.
  • NEW: Add support for determining if a color is in the Pointer Gamut and provide a way to clamp a color to the
    gamut.
  • NEW: Include CMFS: CIE 1931 2 Degree Standard Observer, CIE 1964 10 Degree Standard Observer, CIE 2015 2 Degree
    Standard Observer, and CIE 2015 10 Degree Standard Observer.
  • NEW: Add split_chromaticity() method which will split a color into its chromaticity and luminance parts.
  • NEW: Add chromaticity() which will create a new color from a given set of chromaticity coordinates.
  • NEW: Relax chromatic_adaptation() type requirement of white point chromaticity inputs.
  • NEW: luminance(), xy(), and uv() all now accept an optional white point via the white parameter to
    control the white point in which the returned values are relative to. luminance() still defaults to D65 but will
    use the current color's white point, like xy() and uv() if white is set to None.
  • NEW: white() now accepts a positional parameter allowing it to output the white point of the current color
    as various chromaticity coordinates in addition to the default XYZ coordinates.
  • FIX: Fix case where deregistering all plugins with * was not deregistering Filter plugins.
coloraide - 2.3

Published by facelessuser over 1 year ago

2.3

  • NEW ACEScc will now resolve undefined color channels (non-alpha) with a non-zero default that represents black for
    consistency with other ACES color spaces.
  • ENHANCE: Streamline averaging algorithm to increase performance.
  • FIX: Ensure that HCT consistently clamps negative lightness and chroma to zero.
coloraide - 2.2.2

Published by facelessuser over 1 year ago

2.2.2

  • FIX: Improve HCT round trip conversion speed and improve conversion in some weak areas.
coloraide - 2.2.1

Published by facelessuser over 1 year ago

2.2.1

  • FIX: Averaging of a channel set with only undefined values should return an undefined value.
  • FIX: Averaging should be done in linear light by default for a sane default. Default is now srgb-linear.
coloraide - 2.2

Published by facelessuser over 1 year ago

2.2

  • NEW: Add XYB color space.
  • ENHANCE: More efficient averaging.
  • FIX: Fix issue where if all colors have the same channel undefined that a divide by zero can occur.
coloraide - 2.1

Published by facelessuser over 1 year ago

2.1

  • NEW: Add new color averaging method.
  • FIX: Interpolation should not modify any input colors.
coloraide - 2.0.2

Published by facelessuser over 1 year ago

2.0.2

  • FIX: Consistent normalization of HWB hue.
  • FIX: Consistent normalization of color in harmony monochromatic.
coloraide - 2.0.1

Published by facelessuser over 1 year ago

2.0.1

  • FIX: Incorrect result when interpolating from a cylindrical space to a rectangular space and using out_space.
coloraide - 2.0

Published by facelessuser over 1 year ago

2.0

  • BREAK: interpolate, steps, mix, filter, compose, and harmony will no longer base the output color on
    the first input color. Colors will be evaluated in the specified color space and be output in that space unless
    out_space is used to specify a specific output color space. For migration, specify the desired out_space if the
    working space does not match the desired output.

  • BREAK: Achromatic and undefined color channel handling has been rewritten. Color space objects no longer utilize
    the normalize() or achromatic_hue() method and instead now use a new is_achromatic() and resolve_channel()
    methods.

  • NEW: Expose the new Color.is_achromatic() method to tell if colors, even non-cylindrical colors, are achromatic
    or reasonably close to achromatic.

  • NEW: Color channel definitions can specify a non-zero default for an undefined channel. Use resolve_channel()
    for more advanced handling.

  • NEW: CAM16, CAM16 UCS, CAM16 SCD, CAM15 LCD, CAM16 JMh, HCT, Jzazbz, JzCzhz, and IPT all currently require a
    dynamic approach to detect achromatic colors. Undefined LCh chroma and hue channels and Lab a and b channels can now
    resolve to non-zero values when undefined for better achromatic interpolation.

  • NEW (ACEScct) will now resolve undefined color channels (non-alpha) with a non-zero default that represents black
    as zero is actually out of gamut for that space.

  • NEW: filter, compose, and harmony all now support the out_space parameter.

  • NEW: All <space>ish mixin classes now give access to normalized names and indexes as names() and indexes()
    opposed to <space>ish_names() etc. Old methods are still available but are deprecated.

  • NEW: All RGB, HSL, and HSV color spaces are now created with a respective RGBish, HSLish, and HSVish mixin
    class.

  • NEW: Separable blend modes will now be evaluated in whatever RGB-ish color space is provided.

  • NEW: compose will throw an error if a non-RGB-ish color space is provided.

  • NEW: Color.normalize() added a new nans parameter that when set to False will prevent achromatic hue
    normalization and will just force all channels to be defined.

  • NEW: Color.coords() and Color.alpha(), which used to be available during the alpha/beta period have been
    re-added. coords() accesses just the color channels (no alpha channel) while alpha() gets the alpha channel.

  • NEW: Coordinate access functions: get(), set(), coords(), and alpha() functions now have a nans
    parameter that when set to False will ensure the component(s) is returned as a real number instead of NaN. Set
    operations only apply this when passing the current value to a callback for relative modification.

  • NEW: A norm parameter is now added to convert and update. When set to False, it will prevent achromatic
    normalization of hues during conversion. If no conversion is needed, the color is returned as is.

  • NEW: ColorAide used to gamut map colors such as HSL, HSV, and HWB when interpolating into those spaces. This is no
    longer done. It is possible to gamut map wider gamuts with these color spaces, so it will be up to the user to apply
    gamut mapping when it is determined they need it.

  • NEW: EXTENDED_RANGE is no longer needed and is removed from current color space classes.

  • NEW: Improved accuracy for Oklab, OkLCh, Okhsl, and Okhsv.

  • NEW: New "continuous" interpolation method.

  • FIX: Fix aliases in IPT and IgPgTg.

  • FIX: Fix some conversion issues with CAM16 based color spaces that was caused due to bad achromatic handling.

coloraide - 1.8.2

Published by facelessuser over 1 year ago

1.8.2

  • FIX: Ensure Brettel CVD approach uses Judd-Vos CMFs
  • FIX: Fix some exception messages.
coloraide - 1.8.1

Published by facelessuser over 1 year ago

1.8.1

  • FIX: Ensure Judd-Vos correction is applied to linear RGB to LMS conversion for CVD.
  • FIX: Fix outdated API information in docs.
coloraide - 1.8

Published by facelessuser over 1 year ago

1.8.0

  • NEW: Modern sRGB, HSL, and HWB should allow mixed percentage and numbers. HSL and HWB percentages in the hsl()
    and hwb() formats respectively will resolve to numbers in the range [0, 100]. These changes reflect the latest
    changes in the CSS Level 4 Color spec.
  • NEW: HSL and HWB can serialize to a modern syntax that does not use percentages, but the default still uses
    percentages.
  • NEW: Rework CSS parsing for better performance.
  • FIX: Handle some parsing corner cases that are handled by browsers, but not by ColorAide. For example,
    color(srgb 1-0.5.4) should parse as color(srgb 1 -0.5 0.4).
  • FIX: Ensure that COLOR_FORMAT is respected.
coloraide - 1.7.1

Published by facelessuser over 1 year ago

1.7.1

  • FIX: Ensure CAM16 spaces mirrors positive and negative percentages for a and b components.
  • FIX: Since the CAM16 JMh model can not predict achromatic colors with negative lightness and, more importantly,
    negative lightness is not useful, limit the lower end of lightness in CAM16 spaces to zero.
  • FIX: When a CAM16 JMh (or HCT) color's chroma, when not discounting illuminance, has chroma drop below the actual
    ideal achromatic chroma threshold, just use the ideal chroma to ensure better conversion back to XYZ.
  • FIX: Jzazbz and JzCzhz model can never translate a color with a negative lightness, so just clamp negative
    lightness while in Jzazbz and JzCzhz.
  • FIX: Fix a math error in CAM16.
  • FIX: Fix CAM16 JMh M limit which was too low.
  • FIX: IPT was set to "bound" when it should have an unbounded gamut.
  • FIX: When both comma and none are enabled it could make undefined alpha values show up as none in legacy CSS
    format.
  • FIX: Sane handling of inverse lightness in DIN99o.
coloraide - 1.7

Published by facelessuser over 1 year ago

1.7

  • NEW: Add support for CAM16 Jab and JMh: cam16 and cam16-jmh respectively.
  • NEW: Add support for CAM16 UCS (Jab forms): cam16-ucs, cam16-scd, and cam16-lcd.
  • NEW: Add support for the HCT color space (hct) which combines the colorfulness and hue from CAM16 JMh and the
    lightness from CIELab.
  • NEW: Gamut mapping classes derived from fit_lch_chroma can set DE_OPTIONS to pass ∆E parameters.
  • NEW: While rare, some cylindrical color spaces have an algorithm such that achromatic colors convert best with a
    very specific hue. Internally, this is now handled during conversions, but there can be reasons where knowing the hue
    can be useful such as plotting. Cylindrical spaces now expose a method called achromatic_hue() which will
    return this specific hue if needed.
  • FIX: Fix rec2100-hlg transform.
  • FIX: Some color transformation improvements.
  • FIX: Relax some achromatic detection logic for sRGB cylindrical models. Improves achromatic hue detection results
    when converting to and from various non-sRGB color spaces.
Package Rankings
Top 6.23% on Pypi.org
Top 43.41% on Conda-forge.org
Badges
Extracted from project README
Donate via PayPal Build Coverage Status PyPI Version PyPI Downloads PyPI - Python Version