Ghost/ghost/admin/app/helpers/hex-contrast.js
Kevin Ansfield 503845ce59 Fixed incorrect darkening of email-cta button on hover with some colours
refs https://github.com/TryGhost/Team/issues/928

- the background color of the button was incorrectly applied to the original accent colour rather than the adjusted accent color
- added adjustment of text color on hover too in case it went outside of a visible range
2021-07-29 15:11:17 +01:00

7 lines
237 B
JavaScript

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