A reimplementation of the great Polished library in ReasonML with following goals:
- Provide data types for color manipulation
- Implement many of the color manipulation functions from Polished in platform agnostic ReasonML.
- Offer a binding layer for Bs-Css and others (?) for easier use on web platform (Bucklescript)
Add following line to your package.json, delete lock file and re-install dependencies.
"@rohea/re-polished": "https://github.com/Rohea/re-polished.git#master",
Then add @rohea/re-polished
to bs-dependencies
in your bsconfig.json
.
At some point there will probably be a proper release. Watch this space.
let myClass = Css.style([
Css.backgroundColor(`hex("ff0000")->PolishedCss.darken(0.5))
]);
- darken
- desaturate
- invert
- lighten
- mix
- opacify
- readable
- shade
- tint
- transparentize
- setAlpha
New functions are added as soon as we need them or someone makes a nice pull request :)
- Add more functions
- Possibly create a proper monorepo structure with published sub packages