Skip to content

Replace unmaintained color-thief-react with use-color-thief#700

Merged
danactive merged 6 commits intomainfrom
copilot/check-newer-fork-color-thief
Feb 9, 2026
Merged

Replace unmaintained color-thief-react with use-color-thief#700
danactive merged 6 commits intomainfrom
copilot/check-newer-fork-color-thief

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

color-thief-react hasn't been updated since 2020. Migrated to use-color-thief (v1.3.2), an actively maintained fork using React hooks.

Changes

  • Dependency: color-thief-react@2.1.0use-color-thief@1.3.2
  • SplitViewer component: Refactored from render prop pattern to hook-based API
  • Test mocks: Updated to return hook result object instead of render prop component

API Migration

Before:

<Color src={imageUrl} format="rgbString">
  {({ data: colour }) => (
    <style>{`background: ${colour}`}</style>
  )}
</Color>

After:

const { color } = useColorThief(imageUrl, { format: 'rgb' })
const colourString = color ? `rgb(${color[0]}, ${color[1]}, ${color[2]})` : undefined

{colourString && <style>{`background: ${colourString}`}</style>}

Side Effects

  • Resolved 7 npm security vulnerabilities in dependency chain

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • downloads.snyk.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node wrapper_dist/bootstrap.js exec (dns block)
  • o30291.ingest.sentry.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node wrapper_dist/bootstrap.js exec (dns block)
  • static.snyk.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node wrapper_dist/bootstrap.js exec (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
history Ready Ready Preview, Comment Feb 9, 2026 0:01am

Co-authored-by: danactive <1093286+danactive@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate newer fork of color-thief library Replace unmaintained color-thief-react with use-color-thief Feb 5, 2026
Copilot AI requested a review from danactive February 5, 2026 05:23
@danactive danactive marked this pull request as ready for review February 9, 2026 00:03
@danactive danactive merged commit 00bc764 into main Feb 9, 2026
18 checks passed
@danactive danactive deleted the copilot/check-newer-fork-color-thief branch February 9, 2026 00:04
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.

2 participants