# nie-colorpicker

> 非常漂亮的一款拾色器,支持多种颜色格式的输入输出,支持渐变色选择。

Latest version **1.2.0** (published 2023-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install nie-colorpicker
pnpm add nie-colorpicker
yarn add nie-colorpicker
bun add nie-colorpicker
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-12-08 |
| First published | 2023-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 211.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | aesoper |
| Maintainers | nierifeng |

## Links

- npm: https://www.npmjs.com/package/nie-colorpicker
- Homepage: https://github.com/aesoper101/vue3-colorpicker#readme
- Issues: https://github.com/aesoper101/vue3-colorpicker/issues
- npm.io page: https://npm.io/package/nie-colorpicker

## Dependencies (7)

- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [vue-types](https://npm.io/package/vue-types.md) ^4.1.0
- [tinycolor2](https://npm.io/package/tinycolor2.md) ^1.4.2
- [@vueuse/core](https://npm.io/package/@vueuse/core.md) ^10.1.2
- [@popperjs/core](https://npm.io/package/@popperjs/core.md) ^2.11.8
- [gradient-parser](https://npm.io/package/gradient-parser.md) ^1.0.2
- [@aesoper/normal-utils](https://npm.io/package/@aesoper/normal-utils.md) ^0.1.5

## Recent versions

- 1.2.0 (latest) — 2023-12-08
- 1.1.1 — 2023-07-26
- 1.1.0 — 2023-07-20
- 1.0.1 — 2023-02-24
- 1.0.0 — 2023-02-24

## README

# colorpicker

A very beautiful color picker, supports input and output of multiple color formats, and supports gradient color selection.

Note: This document is for Vue3ColorPicker v2. If you are looking for an older versions, refer to the v1 branches.The v2 version is a destructive update, and some functions in v1 are no longer supported. Please use it with caution

[Live Demo](https://aesoper101.github.io/vue3-colorpicker/)

[中文文档](https://github.com/aesoper101/vue3-colorpicker/blob/main/README.ZH-cn.md)

## Installation

```
yarn add vue3-colorpicker
```

OR

```
npm install vue3-colorpicker
```

## How to use

### The first step is global registration

```
import Vue3ColorPicker from "vue3-colorpicker";
import "vue3-colorpicker/style.css";

createApp(App)
  .use(router)
  .use(Vue3ColorPicker)
  .mount("#app");
```

OR

```vue3
import { ColorPicker } from "vue3-colorpicker";
import "vue3-colorpicker/style.css";

export default defineComponent({
components: { ColorPicker },
});
```

### Usage

```vue3
<template>
  <div>
     <color-picker v-model:pureColor="pureColor" v-model:gradientColor="gradientColor"/>
  </div>
</template>
<script lang="ts">
  import { ref } from "vue";
  import { ColorInputWithoutInstance } from "tinycolor2";

  export default defineComponent({
     setup() {
       const pureColor = ref<ColorInputWithoutInstance>("red");
       const gradientColor = ref("linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 100%)");

       return { pureColor, gradientColor }
     }
  });
</script>

```

[Live Demo](https://aesoper101.github.io/vue3-colorpicker/)

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