https://github.com/mbejda/ngcolored
Angular directive that displays colors.
https://github.com/mbejda/ngcolored
Last synced: about 1 year ago
JSON representation
Angular directive that displays colors.
- Host: GitHub
- URL: https://github.com/mbejda/ngcolored
- Owner: mbejda
- License: mit
- Created: 2015-11-22T00:45:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-26T02:56:14.000Z (over 10 years ago)
- Last Synced: 2025-07-03T00:09:19.658Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://www.mbejda.com/angular-js-ngcolored-directive/
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

Angular `ngColored` directive lets you display colors in your templates.

## Installation
```
bower install ngColored --save
```
Add `ngcolored` module into your Angular application :
```
angular
.module('coloredApp', [
'ngAnimate',
'ngCookies',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'ngcolored'
])
.config(function($routeProvider) {
})
```
##Getting Started With ngColored
Add the `colored` directive into the templates :
```
```
It works with Twitter Bootstrap 3.x by default. You can add a class attribute to the directive to add your own class styles. The `ngColored` module utilizes the following directive attributes :
- color (ngModel)
- width
- height
- class
## Colors
The color attribute is a ngModel inside the parent controller. This allows the directive to have dynamic color changing capability. The color can either be a hex or rgba.
Source code can be found here :
[https://github.com/mbejda/ngColored](https://github.com/mbejda/ngColored)
For any questions send me a tweet at
[@notmilosbejda](https://twitter.com/notmilobejda)