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) {