PostCSS plugin to format hexadecimal colors
npm install postcss-hex-formatThis plugin will format hexadecimal colors.
``sh`
npm install postcss-hex-format--save
`js
const config = {
length: "long",
case: "upper"
};
postcss([ require('postcss-hex-format')(config) ])
// do your processing here 🎉
`
Or use it in some other PostCSS way.
#### lengthshort
Possible values: or long.long
Default:
Use this option to define weither hex colors should be lengthened or shortened if possible.
#### caseupper
Possible values: or lower.upper
Default:
Use this option to define wheither hex colors should be uppercase or lowercase.
If you configure it to use the long form and uppercase as shown in the usage and process the following:
`css`
a {
color: #abc;
}
You will get this result:
`css``
a {
color: #AABBCC;
}