From 222709bc15ace77ebf03e5a8e17e0bf026520970 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 24 Oct 2021 17:45:09 -0700 Subject: Many version bumps --- core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt') diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt index 0131302..29c0919 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt @@ -89,9 +89,11 @@ fun Int.isColorVisibleOn( @IntRange(from = 0L, to = 255L) minAlpha: Int = 50 ): Boolean = if (Color.alpha(this) < minAlpha) false - else !(abs(Color.red(this) - Color.red(color)) < delta && - abs(Color.green(this) - Color.green(color)) < delta && - abs(Color.blue(this) - Color.blue(color)) < delta) + else !( + abs(Color.red(this) - Color.red(color)) < delta && + abs(Color.green(this) - Color.green(color)) < delta && + abs(Color.blue(this) - Color.blue(color)) < delta + ) @ColorInt fun Context.getDisabledColor(): Int { -- cgit v1.2.3