2.0.6 • Published 6 years ago

ngx-ttitan-color-picker v2.0.6

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

npm version

ngx-ttitan-color-picker

A simple color picker for angular versions 4 - 6.

Features

  • Simple and intuitive interface.
  • High performance.
  • Minimum of dependencies.
  • Color palettes.

##Demo Demo playground

##Installing and usage You can get it on npm. ####NPM $ npm install --save ngx-ttitan-color-picker

Add NgxTTitanColorPickerModule to your application module.

import {NgxTTitanColorPickerModule} from "ngx-ttitan-color-picker";
@NgModule({
  imports: [
    ...,
   NgxTTitanColorPickerModule
  ],
})
export class AppModule { }

Use it in your HTML template:

<lib-ngx-ttitan-color-picker
        [options]="{
          outFormat: 'hex8',
          inputFormat: 'hex8'
        }"
        [color]="color"
        (change)="colorChange($event)"
      ></lib-ngx-ttitan-color-picker>

Component inputs

ParamTypeDefaultDescription
colorstring'#ffffff'Input color. Two-way binding param
titlestring''Picker input label
optionsPickerOptions'{}'Picker configuration

Component options object

ParamTypeDefaultDescription
pickerShowbooleanfalseDisplay color picker on start
noHidebooleanfalseDo not hide the picker
debugbooleanfalseDebug output
outFormatstring'hex6'Output color format
inputFormatstring'hex6'Expected color format in input field
availPalletsstring[]['polaris', 'material']List of color palettes. Set empty array for hide color pallets
customPalletsPalette[]'[]'Custom pallets list

Options palette object

ParamTypeDefaultDescription
namestringfalseDisplay palette name
idstringfalsePalette id. Must be unique.
colorsstring[]falseList of colors

Component outputs

ParamTypeDescription
colorChangeEventEmmiter<string>Output color

P.S.:

This is my first public module for Angular. So do not judge strictly ;)

Version changes

v2.0.4

  • Fixed rgba && hsla alpha bug

v2.0.5

  • Added style for color pallets

v2.0.6

  • Fixed hex8 alpha
2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago