Commit 05ed8565 authored by Zéfling's avatar Zéfling 🎨
Browse files

Add reset method

parent a51782f8
# Changelog of coloration-lib # Changelog of coloration-lib
## V0.0.4 (2019-01-23)
### Feature
- add `reset()` method
## V0.0.3 (2019-01-22) ## V0.0.3 (2019-01-22)
### Features ### Features
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# Coloration # Coloration
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.4.
## Installation ## Installation
``` ```
......
{ {
"name": "coloration-lib", "name": "coloration-lib",
"version": "0.0.3", "version": "0.0.4",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
......
...@@ -83,7 +83,14 @@ export class Coloration { ...@@ -83,7 +83,14 @@ export class Coloration {
private hsv: HSV = { h: 0, s: 0, v: 0 }; private hsv: HSV = { h: 0, s: 0, v: 0 };
constructor(public color: string) { constructor(public color: string) {
this.intColor = this.parseColor(color); this.reset();
}
/**
* reinit to base color
*/
reset() {
this.intColor = this.parseColor(this.color);
this.updateColor(); this.updateColor();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment