All Projects → thecreation → jquery-asColorPicker

thecreation / jquery-asColorPicker

Licence: LGPL-3.0 License
ColorInput is a jQuery plugin used to show color picker for a input field.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to jquery-asColorPicker

Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (+1405.56%)
Mutual labels:  jquery-plugin, color-picker
tabullet
Simple jQuery plugins for creating a table that can insert, edit, and delete row in one place.
Stars: ✭ 13 (-27.78%)
Mutual labels:  jquery-plugin
intl-tel-input-rails
intl-tel-input for the Rails asset pipeline
Stars: ✭ 35 (+94.44%)
Mutual labels:  jquery-plugin
cascading-dropdown
Cascading form drop-down menus
Stars: ✭ 43 (+138.89%)
Mutual labels:  jquery-plugin
color-picker
A color picker app made in flutter
Stars: ✭ 46 (+155.56%)
Mutual labels:  color-picker
hierarchy-select
Hierarchy Select jQuery Plugin for Twitter Bootstrap
Stars: ✭ 40 (+122.22%)
Mutual labels:  jquery-plugin
przm
🎨 A simple, yet feature rich color picker and manipulator
Stars: ✭ 19 (+5.56%)
Mutual labels:  color-picker
bootstrap-dropselect
A simple jQuery plugin that extends bootstrap's dropdown menu into something like github's select menu.
Stars: ✭ 77 (+327.78%)
Mutual labels:  jquery-plugin
jquery-load-json
jQuery plugin that enables developers to load JSON data from the server and load JSON object into the DOM
Stars: ✭ 26 (+44.44%)
Mutual labels:  jquery-plugin
busy-load
A flexible loading-mask jQuery-plugin
Stars: ✭ 76 (+322.22%)
Mutual labels:  jquery-plugin
decoy
jQuery plugin to make decoys for your elements.
Stars: ✭ 53 (+194.44%)
Mutual labels:  jquery-plugin
ivia
A reactive & model-driven MVVM framework for jQuery with Vue-like interface.
Stars: ✭ 69 (+283.33%)
Mutual labels:  jquery-plugin
jsontree
jQuery plugin for JSON visualization
Stars: ✭ 14 (-22.22%)
Mutual labels:  jquery-plugin
ml-stack-nav
Customizable, responsive, accessible, easy-to-use multi-level stack navigation menu with slide effect.
Stars: ✭ 20 (+11.11%)
Mutual labels:  jquery-plugin
dom-navigator
⚓️ JS library that allow keyboard navigation through DOM elements (←↑→↓).
Stars: ✭ 36 (+100%)
Mutual labels:  jquery-plugin
GaugeMeter
An elegant and dynamic animated graphical gauge meter built with jQuery. GaugeMeter.js is highly customizable and includes full-radial, semi-radial & arch dials.
Stars: ✭ 30 (+66.67%)
Mutual labels:  jquery-plugin
biz-ui
jQuery Plugin Collections for Business
Stars: ✭ 24 (+33.33%)
Mutual labels:  jquery-plugin
jquery-svg
A jQuery plugin to apply css styles and js scripts to a SVG which is embedded (using the <object> tag).
Stars: ✭ 28 (+55.56%)
Mutual labels:  jquery-plugin
jquery.skeleton.loader
A jQuery plugin to make screen skeleton loader.
Stars: ✭ 65 (+261.11%)
Mutual labels:  jquery-plugin
ColorPicker
Customizable Color Picker control for WPF
Stars: ✭ 57 (+216.67%)
Mutual labels:  color-picker

jQuery asColorPicker bower NPM version Dependency Status prs-welcome

A jquery plugin that convent input into color picker.

Table of contents

Main files

dist/
├── jquery-asColorPicker.js
├── jquery-asColorPicker.es.js
├── jquery-asColorPicker.min.js
└── css/
    ├── asColorPicker.css
    └── asColorPicker.min.css

Quick start

Several quick start options are available:

Download the latest build

Install From Bower

bower install jquery-asColorPicker --save

Install From Npm

npm install jquery-asColorPicker --save

Install From Yarn

yarn add jquery-asColorPicker

Build From Source

If you want build from source:

git clone [email protected]:amazingSurge/jquery-asColorPicker.git
cd jquery-asColorPicker
npm install
npm install -g gulp-cli babel-cli
gulp build

Done!

Requirements

jquery-asColorPicker requires the latest version of jQuery, jquery-asColor, and jquery-asGradient.

Usage

Including files:

<link rel="stylesheet" href="/path/to/asColorPicker.css">
<script src="/path/to/jquery.js"></script>
<script src="/path/to/jquery-asColor.js"></script>
<script src="/path/to/jquery-asGradient.js"></script>
<script src="/path/to/jquery-asColorPicker.js"></script>

Required HTML structure

<input type='text' class="example" value="#000" />

Initialization

All you need to do is call the plugin on the element:

jQuery(function($) {
  $('.example').asColorPicker(); 
});

Examples

There are some example usages that you can look at to get started. They can be found in the examples folder.

Options

jquery-asColorPicker can accept an options object to alter the way it behaves. You can see the default options by call $.asColorPicker.setDefaults(). The structure of an options object is as follows:

{
  namespace: 'asColorPicker',
  readonly: false,
  skin: null,
  lang: 'en',
  hideInput: false,
  hideFireChange: true,
  keyboard: false,
  color: {
    format: false,
    alphaConvert: { // or false will disable convert
      'RGB': 'RGBA',
      'HSL': 'HSLA',
      'HEX': 'RGBA',
      'NAMESPACE': 'RGBA',
    },
    shortenHex: false,
    hexUseName: false,
    reduceAlpha: true,
    nameDegradation: 'HEX',
    invalidValue: '',
    zeroAlphaAsTransparent: true
  },
  mode: 'simple',
  onInit: null,
  onReady: null,
  onChange: null,
  onClose: null,
  onOpen: null,
  onApply: null
}

Methods

Methods are called on asColorPicker instances through the asColorPicker method itself. You can also save the instances to variable for further use.

// call directly
$().asColorPicker('destroy');

// or
var api = $().data('asColorPicker');
api.destroy();

opacity()

Get or set opacity.

// get opacity
$().asColorPicker('opacity');

// set opacity
$().asColorPicker('opacity', 0.1);

open()

Show the colorpicker dropdown.

$().asColorPicker('open');

close()

Close the colorpicker dropdown.

$().asColorPicker('close');

clear()

Clear the colorpicker.

$().asColorPicker('clear');

val(value)

Get or set the colorpicker val.

// get the color
$().asColorPicker('val');

// set the color
$().asColorPicker('val', 'rgb(100, 100, 100)');

set(value)

Set the color.

$().asColorPicker('set', 'rgb(100, 100, 100)');

get()

Get the color.

$().asColorPicker('get');

enable()

Enable the colorpicker functions.

$().asColorPicker('enable');

enable()

Enable the colorpicker functions.

$().asColorPicker('enable');

disable()

Disable the colorpicker functions.

$().asColorPicker('disable');

destroy()

Destroy the colorpicker instance.

$().asColorPicker('destroy');

Events

jquery-asColorPicker provides custom events for the plugin’s unique actions.

$('.the-element').on('asColorPicker::change', function (e) {
  // on value change 
});
Event Description
init Fires when the instance is setup for the first time.
ready Fires when the instance is ready for API use.
change Fires when the value changed.
enable Fires when the enable instance method has been called.
disable Fires when the disable instance method has been called.
destroy Fires when an instance is destroyed.

No conflict

If you have to use other plugin with the same namespace, just call the $.asColorPicker.noConflict method to revert to it.

<script src="other-plugin.js"></script>
<script src="jquery-asColorPicker.js"></script>
<script>
  $.asColorPicker.noConflict();
  // Code that uses other plugin's "$().asColorPicker" can follow here.
</script>

Browser support

Tested on all major browsers.

Safari Chrome Firefox Edge IE Opera
Latest ✓ Latest ✓ Latest ✓ Latest ✓ 9-11 ✓ Latest ✓

As a jQuery plugin, you also need to see the jQuery Browser Support.

Contributing

Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing. Make sure you're using the latest version of jquery-asColorPicker before submitting an issue. There are several ways to help out:

Development

jquery-asColorPicker is built modularly and uses Gulp as a build system to build its distributable files. To install the necessary dependencies for the build system, please run:

npm install -g gulp
npm install -g babel-cli
npm install

Then you can generate new distributable files from the sources, using:

gulp build

More gulp tasks can be found here.

Changelog

To see the list of recent changes, see Releases section.

Copyright and license

Copyright (C) 2016 amazingSurge.

Licensed under the LGPL license.

back to top

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].