Cordelia Vue - a VueJS plugin that allows you to add a rich color picker into your web pages

Overview

Cordelia Vue

Cordelia Vue is a VueJS plugin that allows you to add a rich color picker into your web pages. See the documentation and demo for more information: https://cevadtokatli.github.io/cordelia-vue

NPM

npm install --save cordelia-vue

Installation

You can import the main Cordelia Component and render it.

import Vue from 'vue';
import Cordelia from 'cordelia-vue';

new Vue({
	el: '#picker',
    components: {Cordelia},
    render: h => h('Cordelia')
});

You can also add the script file into your html.

">



Put the CSS file in the head tag.

">

Settings

Option Type Default Description
color String #FF0000 The picker's initial value.
colorFormat String hex The format of the picker's value. Cordelia supports three types of formats: HEX, RGB and HSL. If the opacity is less than 1, HSL is automatically converted to HSLA, HEX and RGB are automatically converted to RGBA.
pickerStyle Number 0 Cordelia comes with two style options. In the first style, the main box allows setting the saturation and lightness of the color and the second box allows setting the color; this is the default. In the second style, the main box allows setting the color and the second box allows setting the saturation and lightness. For more information please view the demo.
embed Boolean true A boolean value that indicates whether the picker is shown when a button is clicked or embedded into the page directly. If it is false, a button is displayed that allows users to show the picker.
size String medium The picker's size. Three options available Small, Medium, Large.
allowOpacity Boolean true A boolean value that indicates whether the opacity bar is visible or not.
allowClearColor Boolean false A boolean value that indicates whether the clear color button (an eraser icon that allows clearing selection) is visible or not.
showColorValue Boolean true A boolean value that indicates whether the color value box is visible or not. Color value box allows you to set a color by typing its name or code. All of the CSS color formats are supported (HEX, RGB, RGBA, HSL, HSLA).
showButtons Boolean true A boolean value that indicates whether the buttons are visible or not. If the embed property is false, the only way to close the picker is to click on the Save or Cancel button.
showPalette Boolean true A boolean value that indicates whether the color table is visible or not. Color table allows you to show pre-defined colors. It is also possible for users to save colors for later use by adding this table.
paletteColors String[] #FFFFB5, #FBBD87, #F45151, #7AEA89, #91C8E7, #8EB4E6, #B0A7F1 An array that holds the name or codes of the colors that will be shown in the Color Table as default.
allowPaletteAddColor Boolean true A boolean value that indicates whether users can add a color to the color table or not.

Callbacks

Callback Description
onOpen Fires when the picker is open.
onClose Fires when the picker is closed.
onSave Fires when the selection is saved.
onCancel Fires when the picker is closed without being saved.
onChanged Fires when the color is changed.

Methods

Method Params Return Description
get Object Returns the current color.
set newColor:String void Changes the current color.
show void Shows the picker.
hide void Hides the picker.
save void Saves the selection.
cancel void Cancels the selection.

IE Support

IE 10 is not supported and patches to fix problems will not be accepted.

License

Cordelia is provided under the MIT License.

You might also like...
Color picker Vue.js component

vue-colorpicker Color picker Vue.js component.

Vue color picker

Vue color picker Iro color picker for Vue. Demo See demo here Install npm install vue-iro-color-picker --save Usage import ColorPicker from 'vue-iro-

Color Picker app, created by tauri.
Color Picker app, created by tauri.

Color Picker 取色器 ✨ 特性 一键取色并复制到剪贴板 保留历史取色记录 自定义颜色值类型(如:HEX, RGB 等) 自定义取色快捷键(默认:F2) 颜色值去重 历史记录:左键单击显示颜色值,左键双击复制颜色值到剪贴板,右键单击删除颜色 可隐藏界面取色 软件安装包小,占用内存少 🌴

Color picker chrome-style only
Color picker chrome-style only

one-colorpicker A Chrome-style ColorPicker Install $ npm install one-colorpicker Quick Start import {ColorPicker, ColorPanel} from 'one-colorpicker'

Color Picker base on Vue2.x

Color Picker base on Vue2.x

A Vue3.x based color picker component with gradient bar control.
A Vue3.x based color picker component with gradient bar control.

a Vue3.x based color picker component. English | 中文 Features Supports 3 CSS background color modes: solid, linear-gradient and radial-gradient. Suppor

Lightweight color shader/blender/converter plugin implemented for Vue 2.
Lightweight color shader/blender/converter plugin implemented for Vue 2.

Vue Color Blender/Shader/Converter Lightweight color shader/blender/converter plugin implemented for Vue 2. Disclaimer The algoritmn used in this plug

(vue3.0) 🎨 Vue Color Pickers for Sketch, Photoshop, Chrome & more
(vue3.0) 🎨 Vue Color Pickers for Sketch, Photoshop, Chrome & more

🎨 Vue Color Pickers for Sketch, Photoshop, Chrome & more

⚡ A resistor color practice website develop by Vue.js
⚡ A resistor color practice website develop by Vue.js

ResiColor ⚡ A resistor color practice website develop by Vue.js ScreenShots Project setup $ yarn install Compiles and hot-reloads for development $ y

Owner
Cevad Tokatlı
Full Stack Developer
Cevad Tokatlı
Vue Color Picker using native input type color.

Lightweight color picker that uses the native HTML element input type color.

David Custódio 14 Sep 21, 2022
:art: Vue Color Pickers for Sketch, Photoshop, Chrome & more http://vue-color.surge.sh

vue-color Color Pickers for Sketch, Photoshop, Chrome & more with Vue.js(vue2.0). Live demo Installation NPM $ npm install vue-color CommonJS var Phot

Don 2.4k Dec 29, 2022
Radial Color Picker - Vue

Radial Color Picker - Vue Introduction Great UX starts with two basic principles - ease of use and simplicity. Selecting a color should be as easy as

Radial Color Picker 83 Dec 28, 2022
🎨 A natural color picker component for Vue.js

Color picker for Vue.js A Vue.js color picker component designed for humans. Installation npm i --save-dev vue-color-picker-board Browser Include the

Shlomi Nissan 11 Nov 24, 2022
🎨 A Color picker component. Built from the bottom to work with Vue.js.

Verte A Complete Vue.js Color Picker Component Features Multiple Color Models support: RGB, HSL, and HEX. SSR Friendly. Small file size, only 7kb gzip

Baianat 159 Dec 26, 2022
🎨 Lightweight color picker for Vue 3

?? Lightweight color picker for Vue 3

Anish George 141 Jan 2, 2023
Accessible color picker component for Vue.js

vue-accessible-color-picker An accessible Vue.js color picker component. Links: demo npmjs.com/package/vue-accessible-color-picker on BundlePhobia git

Philipp Rudloff 69 Dec 28, 2022
A Nice Color Gradient Picker with Vue

Vue Color Gradient Picker Table of Contents Installation Examples Demos Installation To install, you can use npm or yarn: $ npm install vue-color-grad

Arthur Hayrapetyan 42 Dec 14, 2022
Color picker for vue using Tailwind v2

Vue Tailwind Color Picker Color picker for vue using Tailwind v2. Requires Tailwind Live demo Installation $ npm install vue-tailwind-color-picker $ y

null 15 Jun 21, 2022
A color picker vue component

A color picker vue component

Benny Schudel 0 Feb 8, 2021