Skip to content

Commit

Permalink
TreeComponent: Improve colors (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
denysvitali committed Mar 26, 2019
1 parent 56bd2d0 commit 71a5c83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/shared/components/tree/tree.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ export class TreeComponent implements OnInit {
): DynamicFlatNode {
if (level == 0 || level == -1) {
color = this.colors[element];
color.s = 50;
color.l = 50;
} else {
color = this.getColor(color, level, element);
}
Expand Down Expand Up @@ -153,12 +155,12 @@ export class TreeComponent implements OnInit {
getColor(color: HSLColor, level: number, element: number): HSLColor {
let nc = new HSLColor(color.h, color.s, color.l);

nc.h += 3;
element += 1;

if (level != 0 && level != -1) {
nc.h += element * 10;
nc.l += 1;
nc.h += 0 + element * 5;
nc.l += 0 + element * 2;
nc.s += 8;
//nc.h = nc.h % 360;
}

Expand Down

0 comments on commit 71a5c83

Please sign in to comment.