TryGhost/Ghost

View on GitHub
ghost/admin/app/helpers/hex-contrast.js

Summary

Maintainability
A
0 mins
Test Coverage
import {Color, textColorForBackgroundColor} from '@tryghost/color-utils';
import {helper} from '@ember/component/helper';

export default helper(function hexContrast([hex]) {
    return textColorForBackgroundColor(Color(hex)).hex();
});