Socket
Socket
Sign inDemoInstall

@findify/angularjs-color-picker

Package Overview
Dependencies
2
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @findify/angularjs-color-picker

Color Picker Directive For AngularJS


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

angularjs-color-picker

AngularJS Color Picker Directive

Installation

Bower
bower install angularjs-color-picker --save
Npm
npm install angularjs-color-picker --save
Usage
  • Include files

    • Bower
    <link rel="stylesheet" href="bower_components/angular-color-picker/dist/angularjs-color-picker.min.css" />
    <!-- only include if you use bootstrap -->
    <link rel="stylesheet" href="bower_components/angular-color-picker/dist/themes/angularjs-color-picker-bootstrap.min.css" />
    
    <script src="bower_components/tinycolor/dist/tinycolor-min.js"></script>
    <script src="bower_components/angular-color-picker/dist/angularjs-color-picker.min.js"></script>
    
    • Node
    <link rel="stylesheet" href="node_modules/angular-color-picker/dist/angularjs-color-picker.min.css" />
    <!-- only include if you use bootstrap -->
    <link rel="stylesheet" href="node_modules/angular-color-picker/dist/themes/angularjs-color-picker-bootstrap.min.css" />
    
    <script src="node_modules/tinycolor2/dist/tinycolor2-min.js"></script>
    <script src="node_modules/angular-color-picker/dist/angularjs-color-picker.min.js"></script>
    
  • Add the module to your app

angular.module('app', ['color.picker']);
  • Include in your view
<color-picker ng-model="myColor"></color-picker>

Options

If a list is given then choose one of the items. The first item in the list will be the default. Only ng-model is required.

<color-picker
    ng-model=""
    color-picker-format="'hsl', 'hsv', 'rgb', 'hex', 'hex8'"
    color-picker-alpha="true, false"
    color-picker-swatch="true, false"
    color-picker-swatch-pos="'left', 'right'"
    color-picker-swatch-bootstrap="true, false"
    color-picker-swatch-only="true, false"
    color-picker-pos="'bottom left', 'bottom right', 'top left', 'top right'"
    color-picker-case="'upper', 'lower'"
    color-picker-on-change="onColorChange($event, color)"
></color-picker>

Requirements

  • angularjs (v1.3 and higher)
  • tinycolor.js (18.8 KB minified)

NO requirement for jQuery!

Inspiration

Inspiration and code taken from projects like

FAQs

Last updated on 17 Mar 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc