Skip to content

Commit f925a71

Browse files
SethFalcoSeth Falco
authored and
Seth Falco
committed
Fixed calling method in main without creating object.
1 parent 4d740f9 commit f925a71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Misc/ColorContrastRatio.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ public class ColorContrastRatio {
2121
* @param args
2222
*/
2323
public static void main(String args[]) {
24+
final ColorContrastRatio algorithmImpl = new ColorContrastRatio();
25+
2426
// Relative Luminance: 0.12215748057375966
2527
final Color foreground = new Color(23, 103, 154);
2628

2729
// Relative Luminance: 0.7898468477881603
2830
final Color background = new Color(226, 229, 248);
2931

3032
// Contrast Ratio: 4.878363954846178
31-
final double contrastRatio = getContrastRatio(foreground, background);
33+
final double contrastRatio = algorithmImpl.getContrastRatio(foreground, background);
3234

3335
System.out.println(contrastRatio);
3436
}

0 commit comments

Comments
 (0)