https://github.com/hyperlink/complement
Sampling an area of an image and dynamically generate a rgb color that provides the best contrast to the sampled area.
https://github.com/hyperlink/complement
Last synced: over 1 year ago
JSON representation
Sampling an area of an image and dynamically generate a rgb color that provides the best contrast to the sampled area.
- Host: GitHub
- URL: https://github.com/hyperlink/complement
- Owner: hyperlink
- Created: 2013-04-20T04:17:45.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-04-20T04:25:11.000Z (about 13 years ago)
- Last Synced: 2025-01-24T07:31:09.961Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 699 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##Complement
Sampling an area of an image and dynamically generate a rgb color that provides the best contrast to the sampled area.
## Use case
Overlaying text or icon font over an image.
##Installation
Get all the components used to test this with Bower
npm install -g bower
bower install
Optionally you can create a local server to test (Mac)
npm install -g http-server
http-server .
open http://localhost:8080/index.html
##Issues
Cross origin exceptions if you try to run this from a file:// protocol.
Occasionally the color grid will load all white in Chrome. Clicking Refresh usually solves this.
## Requirements
tinycolor is the only one required for conversions (wrote my own originally but why reinvent the wheel?).