Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
color-finder
Advanced tools
Readme
This class can get you a common color from the image by url. But be careful of ussing this as there are Cross Origin policy which may block some images from different domains.
Live Demo: http://preview.16mb.com/color-finder/
Using bower:
bower install color-finder --save
Using npm:
npm install color-finder
or just download latest release from Github.
ColorFinder.fromImage('http://....jpg', function(color) {...})
color is an array which contains RGB value (ex. [234, 48, 255]).
You can specify maximum value for RGB complement by calling:
ColorFinder.setConfig('maxColorValue', 230)
type:Number [230 by default]
Here 230 will be limit for every color complement (R < 230, G < 230, B < 230).
ColorFinder.setConfig('quality', 10)
type:Number [10 by default]
quality will affect amount of pixels being processed to determine common color. This value may affect performance.
ColorFinder.setConfig('colorsAmount', 10)
type:Number [10 by default]
colorsAmount also affects the quality of final color but in later stage of quantization process. This value does not affect performance ( if colorsAmount is in good range (= ).
ColorFinder.setConfig('useWebWorker', true)
type:Boolean [true by default]
useWebWorker will perform all heavy calculations in Web Worker thread if available in browser
ColorFinder.setConfig('workerPrefixPath', "")
type:String ["" (empty string) by default]
workerPrefixPath will be added to the url path to web worker. In case you have different url path - you can use this value to make worker work.
To build this package run gulp
To run tests run npm test
ColorFinder.setConfig('workerPrefixPath', "your/path/")
to right url prefix.Alex Malkevich
FAQs
This class can get you a common color from the image by url. But be careful of ussing this as there are Cross Origin policy which may block some images from different domains.
We found that color-finder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).