Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/believer/color
Ratio and score for colors according to WCAG
https://github.com/believer/color
bucklescript colors reasonml
Last synced: 19 days ago
JSON representation
Ratio and score for colors according to WCAG
- Host: GitHub
- URL: https://github.com/believer/color
- Owner: believer
- Created: 2020-08-28T07:00:31.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-19T06:49:50.000Z (over 3 years ago)
- Last Synced: 2024-07-31T17:23:52.975Z (3 months ago)
- Topics: bucklescript, colors, reasonml
- Language: Reason
- Homepage: https://color.willcodefor.beer
- Size: 882 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-list - color
README
# Color
[![](https://github.com/believer/color/workflows/Release/badge.svg)](https://github.com/believer/color/actions?workflow=Release)
Calculate WCAG ratio and score between two colors using [wcag-color](https://github.com/believer/wcag-color/).
Try it at [https://color.willcodefor.beer](https://color.willcodefor.beer)## Run Project
```sh
npm install
npm start
# in another tab
npm run server
```When both processes are running, open a browser at http://localhost:3000
## Build for Production
```sh
npm run clean
npm run build
npm run webpack:production
```This will replace the development artifact `build/Index.js` for an optimized
version as well as copy `public/index.html` into `build/`. You can then deploy the
contents of the `build` directory (`index.html` and `Index.js`).If you make use of routing (via `ReasonReact.Router` or similar logic) ensure
that server-side routing handles your routes or that 404's are directed back to
`index.html` (which is how the dev server is set up).**To enable dead code elimination**, change `bsconfig.json`'s `package-specs`
`module` from `"commonjs"` to `"es6"`. Then re-run the above 2 commands. This
will allow Webpack to remove unused code.
'## Build to Now
This project includes building straight to [Now](https://zeit.co/) after Travis has validated
tests and created a release. There are some steps that need to be taken to enable the setup.1. Get a token from your [Now dashboard](https://zeit.co/account/tokens)
1. Set the token as `NOW_TOKEN` in Travis
1. Uncomment the Now build steps in `.travis.yml`
1. Add `now-build` to `package.json` scripts. Now runs this script during it build process:```
"now-build": "npm run build && npm run webpack:production"
```