# cut-hex

> Cut the leading '#' from a hex color code, if presented

Latest version **1.0.0** (published 2017-04-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install cut-hex
pnpm add cut-hex
yarn add cut-hex
bun add cut-hex
```

## 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.0 |
| Published | 2017-04-11 |
| First published | 2017-04-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dominik Winter |
| Maintainers | sydev |
| Keywords | hex, cut, #, sharp, hashtag, color |

## Links

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

## 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.0 (latest) — 2017-04-11

## README

# cut-hex

[![Build Status](https://travis-ci.org/sydev/cut-hex.svg?branch=master)](https://travis-ci.org/sydev/cut-hex)

Cut the leading '#' from a hex color code, if presented

## Table of contents

- [Installation](#installation)
- [Usage](#usage)
- [Development](#development)
- [Changelog](#changelog)


## Installation

```
$ npm install --save cut-hex
```

Or if you prefer yarn:

```
$ yarn add cut-hex
```

## Usage

```JavaScript
const cut_hex = require('cut-hex');

// If no callback function is given, cut_hex returns a promise
cut_hex('#abc123')
  .then(hex => console.log(hex)) // 'abc123'
  .catch(err => console.error(err));

// Here with a given callback function
cut_hex('#abc123', (err, hex) => {
  if (err) console.error(err);

  console.log(hex); // 'abc123'
});

// Also works with no leading # presented
cut_hex('abc123', (err, hex) => {
  if (err) console.error(err);

  console.log(hex); // 'abc123'
});

```

## Development

```
$ npm test
```

## Changelog

- 1.0.0
  - Initial Release

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