# Color Picker

## Introduction

We used [color picker](https://github.com/Simonwep/pickr) a flat, simple, responsive and hackable Color-Picker. No dependencies, no jQuery.

<div align="left"><img src="/files/-LRmbKgZFRTVhDjFZjtD" alt=""></div>

## How to Setup

### **HTML Structure**

```markup
<span class="color-picker"></span>
```

## Dependency

### CSS

```markup
<!-- Pickr CSS -->
<link href="vendors/pickr-widget/dist/pickr.min.css" rel="stylesheet" type="text/css" />
```

### JS

```markup
<!-- Pickr JavaScript -->
<script src="vendors/pickr-widget/dist/pickr.min.js"></script>
<script src="dist/js/pickr-data.js"></script>
```

### Initialize color picker JS

```javascript
/* Pikr Init*/
"use strict";
const pickr = Pickr.create({
    el: '.color-picker',
	default: '#00acf0',
	position: 'left',
    components: {
		preview: true,
        opacity: true,
        hue: true,
		interaction: {
            hex: true,
            rgba: true,
            hsva: true,
            input: true,
            clear: true,
            save: true
        }
    }
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hencework.gitbook.io/pangong/forms/color-picker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
