diff --git a/web_src/js/utils/color.ts b/web_src/js/utils/color.ts index fcc7d80808..096356983a 100644 --- a/web_src/js/utils/color.ts +++ b/web_src/js/utils/color.ts @@ -12,8 +12,7 @@ function useLightText(backgroundColor: AnyColor): boolean { return getRelativeLuminance(backgroundColor) < 0.453; } -/** Given a background color, returns a black or white foreground color that the highest - * contrast ratio. */ +/** Given a background color, returns a black or white foreground color with the highest contrast ratio. */ // In the future, the APCA contrast function, or CSS `contrast-color` will be better. // https://github.com/color-js/color.js/blob/eb7b53f7a13bb716ec8b28c7a56f052cd599acd9/src/contrast/APCA.js#L42 export function contrastColor(backgroundColor: AnyColor): string {