react-native-graph-plus
Version:
📈 Beautiful, high-performance Graphs and Charts for React Native +
19 lines (15 loc) • 419 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hexToRgba = hexToRgba;
function hexToRgba(hex, alpha) {
const r = parseInt(hex.slice(1, 3), 16);
const g = parseInt(hex.slice(3, 5), 16);
const b = parseInt(hex.slice(5, 7), 16);
if (alpha > 0) {
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
}
return `rgb(${r}, ${g}, ${b})`;
}
//# sourceMappingURL=hexToRgba.js.map