Giter Club home page Giter Club logo

md-color-picker's Introduction

md-color-picker

Angular-Material based color picker with no jQuery or other DOM/utility library dependencies.

preview

Demo

Try out the demo here: Demo Plnkr

Install

NPM

  1. Download tinycolor.js 1.2.1 or higher. Other versions may work, though 1.2.1 was used to develop this.
  2. Install md-color-picker.
npm install md-color-picker

Bower (includes tinycolor.js):

bower install md-color-picker

Usage

  • Include the css.
<link href="path/to/md-color-picker/dist/mdColorPicker.min.css" rel="stylesheet" />
  • Include the javascript.
<script src="path/to/tinycolor/dist/tinycolor-min.js"></script>
<script src="path/to/md-color-picker/dist/mdColorPicker.min.js"></script>
  • Add dependencies to your application (ngCookies is optional)
var app = angular.module('myApp', ['ngMaterial','ngCookies', 'mdColorPicker']);
  • Place the directive where ever it is needed. note: this breaks the old version 0.1 as it now uses ng-model instead of value
<div md-color-picker ng-model="valueObj"></div>

Angular dependencies

Other dependencies

The only other dependency is tinycolor.js which is an exceptional color manipulation library.

Disclaimer

This is still in a very early beta, and is rappidly changing (3 versions before initial commit). I am open to any and all help anyone is willing to put in. Will update as we go.

Known issues / TODO

  • Prevent focus from opening color picker on window/tab activation.
  • Focus on preview input when user starts typing.
  • Clean up code.
    • Javascript
    • CSS / LESS
    • Build script cleaned up and static server integrated for development

md-color-picker's People

Contributors

alerosa avatar brianpkelley avatar chris0550 avatar fxding avatar groetzi avatar idonteatsoap avatar janvandenberg avatar jglanz avatar thom-x avatar

Watchers

 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.