# css-custom-properties-transform

> Allow transformation of color values from hex to rgb and their usage in CSS Custom Properties

Latest version **1.2.1** (published 2019-01-22) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install css-custom-properties-transform
pnpm add css-custom-properties-transform
yarn add css-custom-properties-transform
bun add css-custom-properties-transform
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2019-01-22 |
| First published | 2019-01-22 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | DriveK |
| Maintainers | motork-user |
| Keywords | CSS, Custom Properties, Hex, RGB |

## Links

- npm: https://www.npmjs.com/package/css-custom-properties-transform
- Repository: https://bitbucket.org/drivek/css-custom-properties-transform
- Homepage: https://bitbucket.org/drivek/css-custom-properties-transform#readme
- npm.io page: https://npm.io/package/css-custom-properties-transform

## Dependencies (5)

- [chai](https://npm.io/package/chai.md) ^4.2.0
- [mocha](https://npm.io/package/mocha.md) ^5.2.0
- [globule](https://npm.io/package/globule.md) ^1.2.1
- [hex-rgb](https://npm.io/package/hex-rgb.md) ^3.0.0
- [pipe-functions](https://npm.io/package/pipe-functions.md) ^1.3.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2019-01-22
- 1.2.0 — 2019-01-22

## README

# CSS Custom Properties transform

Allow transformation of color values from hex to rgb and their usage in CSS Custom Properties.
This module accepts both a `String` or an `Object` as input.
Accepting a `String` allows the module to be used with Webpack's [Style loader](https://webpack.js.org/loaders/style-loader/#transform).

## Installation
```bash
npm i -D css-custom-properties-transform
```

## Example usage: passing an Object
```javascript
customPropertiesTransform( {
    cssFiles: [
        '*.css',
        'css/**/*.css',
        'css/style-{elektron,elements}.css'
    ]
} );
```

## Example usage: passing a String
```javascript
const styleLoader = {
    loader: 'style-loader',
    options: {
        transform: 'node_modules/css-custom-properties-transform/index.js'
    }
}
```

---
_Source: https://npm.io/package/css-custom-properties-transform · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
