Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/color-utils/cjs/color-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function textColorForBackgroundColor(background) {
// shared with Portal https://github.com/TryGhost/Portal/blob/317876f20d22431df15e655ea6cc197fe636615e/src/utils/contrast-color.js#L26-L29
const yiq = (backgroundColor.red() * 0.299 +
backgroundColor.green() * 0.587 +
backgroundColor.b() * 0.114);
backgroundColor.blue() * 0.114);
Comment thread
cursor[bot] marked this conversation as resolved.
return (yiq >= 186) ? black : white;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

Expand Down
Loading
Loading