From ad0624770dd0f3649751aa7bdb430d1b29c50b61 Mon Sep 17 00:00:00 2001 From: protoclown Date: Mon, 26 Sep 2022 13:01:46 +0200 Subject: [PATCH] fix: adjust snippet description --- framework/core/js/src/common/utils/isDark.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/framework/core/js/src/common/utils/isDark.ts b/framework/core/js/src/common/utils/isDark.ts index 8c949447d..f12ac2cdf 100644 --- a/framework/core/js/src/common/utils/isDark.ts +++ b/framework/core/js/src/common/utils/isDark.ts @@ -1,7 +1,8 @@ /** - * The `getContrast` utility converts a hex color to rgb, and then calcul a YIQ - * value in order to get the appropriate contrast value (is it dark or is it - * light?) See https://www.w3.org/TR/AERT/#color-contrast for references + * The `isDark` utility converts a hex color to rgb, and then calcul a YIQ + * value in order to get the appropriate brightness value (is it dark or is it + * light?) See https://www.w3.org/TR/AERT/#color-contrast for references. A YIQ + * value >= 128 is a light color. */ export default function isDark(hexcolor: String) {