mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 21:33:24 +03:00
503845ce59
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
7 lines
237 B
JavaScript
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();
|
|
});
|