where are your docs?
See original GitHub issueyour readme is inconclusive.
var colorThief = new ColorThief()
colorThief.getColor(sourceImage)
What is a sourceImage
. Is it a URL
, an Element
, a File
object?
I’ve tried to use this prior to a file upload to determine the color… Note: the following does not work.
$('input[type="file"]').on('change', function (e) {
var colorThief = new ColorThief()
var color = colorThief.getColor(e.target.files[0])
})
Do you have any suggestions?
Issue Analytics
- State:
- Created 9 years ago
- Reactions:7
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Location - South Salisbury, MD - Your Doc's In
We are located off of Route 13 South next to Bank of America and across from Salisbury University in the old Horner Honda...
Read more >Find your documents in Windows - Microsoft Support
Search from the taskbar or File Explorer to find your documents. ... Find your files in Windows 11 using one of these methods....
Read more >How to break in Doc Martens quickly and painlessly
Doc Martens are the hottest boot trend right now, but they can be painful to break in. This ultimate guide will show you...
Read more >Google Docs: Online Document Editor | Google Workspace
Use Google Docs to create, and collaborate on online documents. Edit together with secure sharing in real-time and from any device.
Read more >How do I break in my Docs? - Dr Martens
Breaking in your Docs will take time and patience, but everyone goes through it. Read on to discover the ways to make this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @ded , I got this to work. You have to create a new image object prior to calling color thief.
After reading the file as a data URL, the following works.
Again, thanks, @lokesh, for creating this library. Works like magic!
@ksubileau +1 and this error might also happen when
Access-Control-Allow-Origin
is denied.