0.1.1 • Published 4 years ago

postcss-plugin-hsluv v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

postcss-plugin-hsluv

PostCSS plugin for HSLuv color model functions

HSL LightnessHSLuv Lightness
hslhsluv

Usage

npm install postcss-plugin-hsluv

postcss.config.js

module.exports = {
  plugins: {
    'postcss-plugin-hsluv': {}
  }
}

Example

Input

div {
  background: hsluv(120, 50%, 50%);
  color: hsluv(120, 50%, 85%);
}

Todo

  • Transform to HSL instead of hex
  • Support for alpha values
  • Tests

Acknowledgements

Full credit for HSLuv color model and its design goes to hsluv/shluv and its maintainers. This postcss plugin merely uses the javascript implementation from the repository.