Skip to content

Commit 10ae070

Browse files
authored
Merge pull request #1385 from qiushui95/master
static ColorUtils.isLightColor
2 parents 27cf719 + be7c7c2 commit 10ae070

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utilcode/src/main/java/com/blankj/utilcode/util/ColorUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public static int getRandomColor(final boolean supportAlpha) {
211211
* @param color The color.
212212
* @return {@code true}: yes<br>{@code false}: no
213213
*/
214-
public boolean isLightColor(@ColorInt int color) {
214+
public static boolean isLightColor(@ColorInt int color) {
215215
return 0.299 * Color.red(color) + 0.587 * Color.green(color) + 0.114 * Color.blue(color) >= 127.5;
216216
}
217217
}

0 commit comments

Comments
 (0)