Ghost/ghost/admin/app/helpers/hex-contrast.js

7 lines
237 B
JavaScript
Raw Normal View History

import {Color, textColorForBackgroundColor} from '@tryghost/color-utils';
import {helper} from '@ember/component/helper';
export default helper(function hexContrast([hex]) {
return textColorForBackgroundColor(Color(hex)).hex();
});