All Projects → brianpkelley → Md Color Picker

brianpkelley / Md Color Picker

Licence: mit
Angular-Material based color picker

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Md Color Picker

pantone-colors
Hex values of all 2310 Pantone colors
Stars: ✭ 147 (-41.9%)
Mutual labels:  palette, color-picker, color-palette
vscode-color
Helper with GUI to generate color codes such as CSS color notations.
Stars: ✭ 88 (-65.22%)
Mutual labels:  palette, color-picker, color-palette
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (+7.11%)
Mutual labels:  palette, color-picker, color-palette
javascript-color-gradient
Lightweight JavaScript library, used to generate an array of color gradients, between start and finish colors.
Stars: ✭ 54 (-78.66%)
Mutual labels:  palette, color-picker, color-palette
Nord
An arctic, north-bluish color palette.
Stars: ✭ 4,816 (+1803.56%)
Mutual labels:  palette, color-palette
Vue Swatches
🎨 Help the user picking beautiful colors!
Stars: ✭ 456 (+80.24%)
Mutual labels:  color-picker, color-palette
R Color Palettes
Comprehensive list of color palettes available in r ❤️🧡💛💚💙💜
Stars: ✭ 708 (+179.84%)
Mutual labels:  palette, color-palette
Leonardo
Generate colors based on a desired contrast ratio
Stars: ✭ 973 (+284.58%)
Mutual labels:  color-picker, color-palette
Dmarman.github.io
Tailwind Ink is an AI palette generator trained with the Tailwindcss colors.
Stars: ✭ 254 (+0.4%)
Mutual labels:  palette, color-palette
Kallewheel
A custom color wheel extension for Adobe Photoshop
Stars: ✭ 16 (-93.68%)
Mutual labels:  color-picker, color-palette
Colors App
🎨 A PWA for copying values from popular color palettes. Supports HEX, RGB, and HSL formats.
Stars: ✭ 90 (-64.43%)
Mutual labels:  color-picker, color-palette
Chromacolorpicker
🎨 An intuitive iOS color picker built in Swift.
Stars: ✭ 434 (+71.54%)
Mutual labels:  color-picker, color-palette
Pickr
🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
Stars: ✭ 3,759 (+1385.77%)
Mutual labels:  color-picker, color-palette
Vapeplot
matplotlib extension for vaporwave aesthetics
Stars: ✭ 483 (+90.91%)
Mutual labels:  palette, color-palette
React Native Color Wheel
🌈 A react native reusable and color picker wheel
Stars: ✭ 137 (-45.85%)
Mutual labels:  color-picker, color-palette
Material Design Colors
Palette for Android Material Design colors.
Stars: ✭ 25 (-90.12%)
Mutual labels:  palette, color-palette
Colordrop
Interactive Drag & Drop Coloring with Material Design Color palette
Stars: ✭ 120 (-52.57%)
Mutual labels:  color-picker, color-palette
Colorbook
🎨 Color schemes for UI design - Optimized for foreground, background, border, etc. https://liyasthomas.github.io/colorbook
Stars: ✭ 148 (-41.5%)
Mutual labels:  color-picker, color-palette
Angular Color Picker
Vanilla AngularJS Color Picker Directive with no requirement on jQuery
Stars: ✭ 173 (-31.62%)
Mutual labels:  color-picker, angularjs
aframe-colorwheel-component
A-Frame Colorwheel. Based on A-Painter and A-Frame Material 🎨🅰
Stars: ✭ 16 (-93.68%)
Mutual labels:  color-picker, color-palette

md-color-picker

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

NPM version BOWER version Build Status

preview

Demo

Try out the demo here: GitHub Page

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

Angular dependencies

Other dependencies

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

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 wherever 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>

Options

Options may be set either by an options object on the md-color-picker attribute and/or using attributes. If an option is present on both the options object and as an attribute, the attribute will take precedence.

Setting options by scope object

// Controller
$scope.scopeVariable.options = {
    label: "Choose a color",
    icon: "brush",
    default: "#f00",
    genericPalette: false,
    history: false
};
<div md-color-picker="scopeVariable.options" ng-model="scopeVariable.color"></div>

Setting options by attribute

<div
    md-color-picker
    ng-model="scopeVariable.color"
    label="Choose a color"
    icon="brush"
    default="#f00"
    md-color-generic-palette="false"
    md-color-history="false"
></div>
Option Object name Attribute Option name Type Default Description
type type Int 0 Default output type. 0: hex, 1: rgb, 2: hsl
label label String "" The lable for the input.
icon icon String "" Material Icon name. https://design.google.com/icons/
random random Boolean false Select a random color on open
default default Color "rgb(255,255,255)" Default color
openOnInput open-on-input Boolean true Open color picker when user clicks on the input field. If disabled, color picker will only open when clicking on the preview.
hasBackdrop has-backdrop Boolean true Dialog Backdrop. https://material.angularjs.org/latest/api/service/$mdDialog
clickOutsideToClose click-outside-to-close Boolean true Dialog click outside to close. https://material.angularjs.org/latest/api/service/$mdDialog
skipHide skip-hide Boolean true Allows for opening multiple dialogs. https://github.com/angular/material/issues/7262
preserveScope preserve-scope Boolean true Dialog preserveScope. https://material.angularjs.org/latest/api/service/$mdDialog
clearButton md-color-clear-button Boolean true Show the "clear" button inside of the input.
preview md-color-preview Boolean true Show the color preview circle next to the input.
alphaChannel md-color-alpha-channel Boolean true Enable alpha channel.
spectrum md-color-spectrum Boolean true Show the spectrum tab.
sliders md-color-sliders Boolean true Show the sliders tab.
genericPalette md-color-generic-palette Boolean true Show the generic palette tab.
materialPalette md-color-material-palette Boolean true Show the material colors palette tab.
history md-color-history Boolean true Show the history tab.
hex md-color-hex Boolean true Show the HEX values tab.
rgb md-color-rgb Boolean true Show the RGB values tab.
hsl md-color-hsl Boolean true Show the HSL values tab.
defaultTab md-color-default-tab String, Int "spectrum" Which tab should be selected when opening. Can either be a string or index. If the value is an index, do not count hidden/disabled tabs.
  • spectrum
  • sliders
  • genericPalette
  • materialPalette
  • history

Disclaimer

This is still in a very early beta, and is rapidly 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

[ ] Break apart md-color-picker into other directives, md-color-picker-preview , input, etc. [ ] Add i18n support. [ ] Refactor LESS [ ] Add optional SASS file [ ] IE 11 Issues [ ] Inline dropdown mode [ ] Validation

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