Skip to content

Commit

Permalink
Add closing parentheses to Color.toString calls (williamngan#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
prkirby authored Mar 5, 2021
1 parent 28aa83a commit 3ebc841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ export class Color extends Pt {
return `#${_hex(this[0])}${_hex(this[1])}${_hex(this[2])}`;

} else if (format == "rgba") {
return `rgba(${Math.floor(this[0])},${Math.floor(this[1])},${Math.floor(this[2])},${this.alpha}`;
return `rgba(${Math.floor(this[0])},${Math.floor(this[1])},${Math.floor(this[2])},${this.alpha})`;

} else if (format == "rgb") {
return `rgb(${Math.floor(this[0])},${Math.floor(this[1])},${Math.floor(this[2])}`;
return `rgb(${Math.floor(this[0])},${Math.floor(this[1])},${Math.floor(this[2])})`;

} else {
return `${this._mode}(${this[0]},${this[1]},${this[2]},${this.alpha})`;
Expand Down

0 comments on commit 3ebc841

Please sign in to comment.