Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ddprrt/sass-hwb
A Sass function for the HWB color model
https://github.com/ddprrt/sass-hwb
Last synced: 5 days ago
JSON representation
A Sass function for the HWB color model
- Host: GitHub
- URL: https://github.com/ddprrt/sass-hwb
- Owner: ddprrt
- License: mit
- Created: 2014-07-13T22:23:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-07-06T07:48:40.000Z (over 3 years ago)
- Last Synced: 2024-12-10T15:56:18.740Z (27 days ago)
- Language: SCSS
- Size: 10.7 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sass-hwb
========A Sass function for the HWB color model [![Build Status](https://travis-ci.org/ddprrt/sass-hwb.svg)](https://travis-ci.org/ddprrt/sass-hwb)
## Introduction
The HWB color model is coming to CSS, and you can use it right now with Sass. Read more about the HWB model [here](http://fettblog.eu/hwb-colors/) and at the [W3C working draft for the CSS color module, level 4](http://dev.w3.org/csswg/css-color/#the-hwb-notation).
## Installation
Install it with [bower](http://bower.io) or download the `_hwb.scss` file from this repository.
```
bower install --save sass-hwb
```Include the `_hwb.scss` file in your main Sass file:
```
@import "/bower_components/sass-hwb/src/hwb";
```And start using it:
```
body {
// results in rgba(128, 255, 0, 0.5)
background-color: hwb(90deg, 0, 0, 0.5);
// results in #80e9ff
color: hwb(190deg, 0.5, 0);
}
```Enjoy!
## Demo
Try it at [Codepen](http://codepen.io/ddprrt/pen/Gxrwd)
## Credits
* Kudos to [@pangratz](http://github.com/pangratz) for introducing unit tests!