Skip to content

Instantly share code, notes, and snippets.

@11111000000
Created March 15, 2014 01:48
Show Gist options
  • Save 11111000000/9560680 to your computer and use it in GitHub Desktop.
Save 11111000000/9560680 to your computer and use it in GitHub Desktop.
Angular colorpicker template (jade)
script(type='text/ng-template', id='colorpicker-template')
.color-container.animation(draggable, ng-show='shown', ng-style='elStyle', ng-keydown='keyDown($event)')
ul.color-palette(ng-show='palette')
li(class='color-preview')
.preview-box(ng-style='{backgroundColor: currentColor}', ng-click='select(currentColor)')
li.pal-pre(ng-repeat='color in palette')
.preview-box(ng-style='{backgroundColor: color}', ng-click='select(color)')
.color-sat-val(ng-style='{backgroundColor : baseColor}')
.color-sat
.color-val(drag='satValDrag($event,drag)', ng-mousedown='satValMousedown($event)')
.color-dragger(drag='draggerDrag($event,drag)', ng-style='draggerStyle')
.color-hue(ng-mousedown='hueMousedown($event)', drag='hueDrag($event, drag)')
.color-slider(drag='sliderDrag($event,drag)', ng-style='sliderStyle')
input.color-opacity(
no-input="true"
myrange=""
min="0"
max="1"
step="0.05"
ng-model="opacity"
)
input.color-css-value(ng-model='inputColor', ng-change='inputChange($event)', focusonshow)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment