Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jul 5, 2025

This PR contains the following updates:

Package Change Age Confidence
color (changelog) 1.82.1.2 age confidence

Release Notes

halostatue/color (color)

v2.1.2

Compare Source

  • Updated to Contributor Covenant 3.0 and applied updates to several support
    documents.

  • Full coverage of conversion tests. Adds CIELAB to_yiq and Grayscale to_xyz
    methods. Only YIQ now lacks conversions support. Fixed in [#​69][pr-69].

  • Fix an incorrect conversion of CIELAB colors with low lightness to XYZ, which
    caused the Y component to be ~903 times larger than correct. In practice, this
    returned unexpectedly bright colours.

    This also affected conversion from CIELAB to RGB, CMYK, HSL, YIQ, and
    grayscale, which convert from CIELAB to XYZ as an intermediate step.

    Reported by @​alexwlchan in [#​95][issue-95] and fixed in [#​96][pr-96].

  • Fix an incorrect comparison when converting CIE XYZ colors to RGB that could
    raise a NoMethodError when constructing the RGB value. The conversion
    incorrectly compared the absolute value of an intermediate value against the
    0.0031308 threshold instead of comparing the original value, causing certain
    negative values to follow the wrong branch and return complex RGB components.

    This also affected conversion from XYZ to CMYK, HSL, and YIK, and from CIELAB
    to RGB, HSL, YIQ, and Grayscale -- all of which convert from XYZ to RGB as an
    intermediate step.

    Reported by @​alexwlchan in [#​92][issue-92] and fixed in [#​93][pr-93].

v2.1.1

Compare Source

Color 2.1.1 fixes a bug where Color::RGB::Black and Color::RGB::White are no
longer defined automatically because they are part of color/rgb/colors.
Internally, this defines Color::RGB::Black000 and Color::RGB::WhiteFFF.

v2.1.0

Compare Source

Color 2.1.0 fixes a computation bug where CIE XYZ values were improperly clamped
and adds more Color::XYZ white points for standard illuminants.

  • Fixes a bug where standard illuminant white points were improperly clamped and
    was seen in Color::RGB#to_lab since CIELAB conversions must go through the
    XYZ color model. Even though we were using the D65 white point, the Z value
    was being clamped to 1.0 instead of the correct value of ≅1.08. Reported by
    @​r-plus in [#​45][issue-45] and fixed in [#​45][pr-46].

    The resulting Color::LAB values are not exactly the same values under Color
    1.8, but they are within fractional differences deemed acceptable.

  • Added more white points for standard illuminants in the Color::XYZ::WP2
    constant. The values here were derived from the
    [White points of standard illuminants][wp-std-illuminant] using the xyY to
    XYZ conversion formula where X = (x * Y) / y and
    Z = ((1 - x - y) * Y) / y. Only the values for CIE 1931 2° were computed.
    The values for Color::XYZ::D50 and Color::XYZ::D65 were replaced with these
    computed values.

v2.0.1

Compare Source

Color 2.0.1 is a minor documentation update.

v2.0.0

Compare Source

Color 2.0.0 is a major release of the Color library.

💣 Breaking Changes

Color 2.0 contains breaking changes. Functionality previously deprecated has
been removed, but other functionality has been changed or removed as part of
this release without prior warning.

  • The minimum supported version of Ruby is 3.2.

  • Color classes are now immutable implementations of Data objects (first
    introduced in Ruby 3.2). This will restrict Color 2 from running on versions
    of JRuby before JRuby 10.

  • The constants Color::COLOR_VERSION and Color::COLOR_TOOLS_VERSION have
    been removed; there is only Color::VERSION. This reverses a planned
    deprecation decision made more than ten years ago that no longer makes sense.

  • All named color classes at Color have been removed as planned.

  • Color::RGB::BeccaPurple has been removed as an alias for
    Color::RGB::RebeccaPurple.

  • The pseudo-constructor Color.new has been removed.

  • Color class constructors no longer yield the constructed color if a block is
    passed.

  • Renamed Color::COLOR_EPSILON and Color::COLOR_TOLERANCE to
    Color::EPSILON and Color::TOLERANCE. These aren't private constants
    because they need to be accessed throughout Color, but they are internal
    constants that should not be used outside of the Color library or functions
    exposed therein.

  • PDF format functions #pdf_fill and #pdf_stroke have been removed from
    Color::CMYK, Color::Grayscale, and Color::RGB. The supporting internal
    constants Color::<class>::PDF_FORMAT_STR have also been removed.

  • Palette processing classes, Color::Palette::AdobeColor,
    Color::Palette::Gimp, and Color::Palette::MonoContrast have been removed.
    Persons interested in using these are encouraged to extract them from
    [Color 1.8][color-1.8] and adapt them to use Color 2.0 APIs.

  • CSS methods (#css_rgb, #css_rgba, #css_hsl, #css_hsla) have been
    replaced with #css on color classes that have CSS representations. The
    output of #css differs (Color 1.8 used the legacy CSS color formats; Color
    2.0 uses modern CSS color formats).

  • Color::GrayScale has been renamed to Color::Grayscale. The alias constant
    Color::GreyScale has been removed.

  • The #html method has been removed from all color classes except Color::RGB.

  • Named RGB colors are no longer defined automatically, but must be loaded
    explicitly by requiring color/rgb/colors. This resolves [#​30][issue-30]. The
    use of Color::RGB#extract_colors, Color::RGB.by_hex, Color::RGB.by_name,
    or Color::RGB.by_css will require color/rgb/colors automatically as they
    require the presence of the named colors.

  • Color:CSS#[] has been removed, as has the containing namespace. It has
    always been a shallow wrapper around Color::RGB.by_name.

🚀 New Features
  • Color::CIELAB and Color::XYZ namespaces have been added. Separate
    implementations were submitted by David Heitzman and @​stiff (in [#​8][pr-8] and
    [#​11][pr-11]), but I have reworked the code substantially. These
    implementations were originally as Color::LAB and include a new contrast
    calculation using the ΔE*00 algorithm.
Internal
  • Updated project structure for how I manage Ruby libraries in 2025. This
    includes increased release security (MFA is required for all releases,
    automated releases are enabled), full GitHub Actions, Dependabot, Standard
    Ruby, and more.

  • Charles Nutter re-added JRuby support in CI. [#​36][pr-36]

Governance

Color 2.0 and later requires that all contributions be signed-off attesting that
the developer created the change and has the appropriate permissions or
ownership to contribute it to this project under the licence terms.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/color-2.x-lockfile branch from facb147 to 9952cce Compare July 5, 2025 04:23
@renovate renovate bot force-pushed the renovate/color-2.x-lockfile branch from 9952cce to 6a717d7 Compare July 20, 2025 17:37
@renovate renovate bot force-pushed the renovate/color-2.x-lockfile branch 2 times, most recently from 0f4c69a to cf0bf82 Compare August 10, 2025 14:59
@renovate renovate bot force-pushed the renovate/color-2.x-lockfile branch from cf0bf82 to d3ccf62 Compare September 25, 2025 18:36
@renovate renovate bot force-pushed the renovate/color-2.x-lockfile branch from d3ccf62 to 667337e Compare November 18, 2025 14:13
@renovate renovate bot force-pushed the renovate/color-2.x-lockfile branch from 667337e to f810ee6 Compare December 31, 2025 01:58
@renovate renovate bot force-pushed the renovate/color-2.x-lockfile branch from f810ee6 to 5b5c4a8 Compare January 3, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant