GithubHelp home page GithubHelp logo

10chars / angular-color-picker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruhley/angular-color-picker

0.0 2.0 0.0 1.77 MB

AngularJS Colour Picker Directive

Home Page: http://ruhley.github.io/angular-color-picker/

License: MIT License

JavaScript 20.09% CSS 79.91%

angular-color-picker's Introduction

angularjs-color-picker

AngularJS Color Picker Directive

Installation

Bower

bower install angularjs-color-picker --save

Npm

npm install angularjs-color-picker --save

Usage

  • Include tinycolor.js, angularjs-color-picker.js and angularjs-color-picker.css
    <link rel="stylesheet" href="bower_components/angularjs-color-picker/angularjs-color-picker.min.css" />

    <script src="bower_components/tinycolor/tinycolor"></script>
    <script src="bower_components/angularjs-color-picker/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.

<color-picker
    ng-model="" <!-- only required field -->
    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-emit-change-event="true, false"  //Passes chosen color to parent scope.
></color-picker>

Requirements

  • angularjs
  • bootstrap - looking at removing in future versions if requested enough (currently only used for styling the input text box)
  • tinycolor.js - looking at removing in future versions if requested enough (33kb not minified)

NO requirement for jQuery!

Inspiration

Inspiration and code taken from projects like

angular-color-picker's People

Contributors

benoror avatar devmanny avatar frejfrej avatar hilnius avatar ijse avatar mqamhieh avatar ruhley avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.