Skip to content

Commit

Permalink
Just make hex work too here
Browse files Browse the repository at this point in the history
  • Loading branch information
gero3 authored and donmccurdy committed Jun 17, 2019
1 parent c2edd82 commit 743a16b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dat/color/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ Object.defineProperty(Color.prototype, 'a', {

Object.defineProperty(Color.prototype, 'hex', {
get: function() {
if (!this.__state.space !== 'HEX') {
if (this.__state.space !== 'HEX') {
this.__state.hex = math.rgb_to_hex(this.r, this.g, this.b);
this.__state.space = 'HEX';
}

return this.__state.hex;
Expand Down

0 comments on commit 743a16b

Please sign in to comment.