Skip to content

Commit

Permalink
Fixed weird color issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidelorenzo committed Dec 9, 2017
1 parent 516c927 commit 685f623
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CS201 Final Project/src/hw9/Set.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,14 @@ public void paint(Graphics g) {

public Color lighten(Color color) {
// lightens darker color to lighter color
Color lighter;
if (color == Colors.dteal)
return Colors.lteal;
if (color == Colors.dlave)
return Colors.llave;
lighter = Colors.lteal;
else if (color == Colors.dlave)
lighter = Colors.llave;
else // == dsalm
return Colors.lsalm;
lighter = Colors.lsalm;
return lighter;
}

public Color getColor(int i) {
Expand All @@ -402,7 +404,7 @@ public Color getFilling(Color color, int i) {
Color filling;
if (i == 0)
filling = Color.white;
if (i == 1)
else if (i == 1)
filling = lighten(color);
else // i == 2
filling = color;
Expand Down

0 comments on commit 685f623

Please sign in to comment.