@daimo/pay
Version:
Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.
17 lines (14 loc) • 451 B
JavaScript
import 'styled-components';
const hexToP3 = (hex) => {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
if (result == null)
return hex;
const values = {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16),
};
return `color(display-p3 ${values.r / 255} ${values.g / 255} ${values.b / 255})`;
};
export { hexToP3 };
//# sourceMappingURL=p3.js.map