2.0.4 • Published 8 years ago

ng-colorpicker v2.0.4

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

ng-colorpicker

Simple and lightweight colorpicker component for angular2

  • no third-party dependencies
  • simple for use

##USAGE 1. install package via npm ` npm install ng-colorpicker

2. Import `ColorPicker` component in `app.module.ts`
  ```ts
  import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { FormsModule } from '@angular/forms';
  import { HttpModule } from '@angular/http';
  
  import { ColorPicker } from 'ng-colorpicker/ng-colorpicker';

  import { AppComponent } from './app.component';
  
  @NgModule({
    declarations: [
      Appcomponent,
      ColorPicker
    ],
    imports: [
      BrowserModule,
      FormsModule,
      HttpModule
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule {}
  1. Use <app-colorpicker> in app.component.html
     ```html
     <app-colorpicker  (color)="func($event)"></datepicker>
     ```
    and get color parametres in func()

##Output Data $event returns JSON object with RGB and Hex colors codes for every single channel. For example

{
        "hexcolor": {
          "Rhex": "FF",
          "Ghex": "FF",
          "Bhex": "FF"
        },
        "rgbcolor": {
          "R": 255,
          "G": 255,
          "B": 255
        }
      }
2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago