Giter VIP home page Giter VIP logo

pickment's Introduction

Pickment 0.9.0

A minimalistic Angular color picker directive.

~12 kb minified. Only depends on TinyColor.

Demo

Try Pickment out

Documentation

Usage

Include Pickment files and dependencies.

<script type="text/javascript" src="tinycolor.js"></script>
<script type="text/javascript" src="pickment.js"></script>
<!-- Color modes are optional, but you need at least one -->
<script type="text/javascript" src="pickment-hue.js"></script>

Inject Pickment and one or more Pickment modes into your Angular app:

angular.module('app', ['pickment', 'pickment-hue']);

Pickment is used with the pickment element with its ng-model holding the CSS color value.

<pickment ng-model="color" preview="true" alpha="true" size="256" mode="hue" format="rgb" position="left top, left top"></pickment>

Using the element requires appropriate styles for the pickment class element it's transformed to. For example:

.pickment {
  min-width: 1em;
  min-height: 1em;
  vertical-align: middle;
  display: inline-block;
  cursor: pointer;
}

Options

Option Default Explanation
preview true Show color preview element
alpha true Show alpha selection element
size 256 Base size of the picker element
mode 'hue' Color selection mode (hue, brightness or saturation)
format 'rgb' Color format (anything Tinycolor supports)
position 'left top, left top' Position and origin of the color picker element

pickment's People

Contributors

hertzahaeon 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.