Skip to content

Commit 46014b6

Browse files
committed
Merge pull request #8 from merih/master
[css-color] Fix typo in HexColor constructor with HexColorInit
2 parents 6ade2ff + 6d5032c commit 46014b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

css-color/Overview.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3036,10 +3036,10 @@ The HexColor Class</h3>
30363036
<pre>
30373037
function(color) {
30383038
if(color === undefined) color = {r:0, g:0, b:0, a:255};
3039-
this.r = this.r === undefined ? 0 : this.r;
3040-
this.g = this.g === undefined ? 0 : this.g;
3041-
this.b = this.b === undefined ? 0 : this.b;
3042-
this.a = this.a === undefined ? 255 : this.a;
3039+
this.r = color.r === undefined ? 0 : color.r;
3040+
this.g = color.g === undefined ? 0 : color.g;
3041+
this.b = color.b === undefined ? 0 : color.b;
3042+
this.a = color.a === undefined ? 255 : color.a;
30433043
return this;
30443044
}
30453045
</pre>

0 commit comments

Comments
 (0)