# npm-togglehex

> Converts hexadecimal color codes to rgb format and vice versa.

Latest version **1.0.5** (published 2021-01-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install npm-togglehex
pnpm add npm-togglehex
yarn add npm-togglehex
bun add npm-togglehex
```

## 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.0.5 |
| Published | 2021-01-12 |
| First published | 2018-06-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kbo |
| Maintainers | kboeff |
| Keywords | toggleHex, hexToRGB, hex, rgb |

## Links

- npm: https://www.npmjs.com/package/npm-togglehex
- npm.io page: https://npm.io/package/npm-togglehex

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-01-12
- 1.0.4 — 2018-06-21
- 1.0.3 — 2018-06-21
- 1.0.2 — 2018-06-20
- 1.0.1 — 2018-06-20
- 1.0.0 — 2018-06-20

## README

# npm-togglehex
Converts hexadecimal color format to rgb.

# usage
Install the npm package.
```
npm install npm-togglehex --save
```

Add this to your JavaScript code.

```js
const hex = require('npm-togglehex');
let result = hex.toggleHex(string));
```
<em>hex</em> and <em>result</em> could be named as you wish and <em>string</em> stands for a string input.<br>
Input could be hexadecimal color format: <strong>#FFFFFF</strong> or RGB in standart CSS notation: <strong>rgb(255,255,255)</strong>.<br>
The toggleHex function will detect the type of input and return the converted value.

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