@elgervb/mock-data
Version:
Mock data made easy, while maintaining type safety
14 lines • 449 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.randomHexColor = void 0;
/**
* Generate a random hex color, like #f4f4f4
*/
function randomHexColor() {
var hexChars = 6;
var hex = Math.floor(Math.random() * 16777215).toString(16);
hex = hex.length === hexChars ? hex : "".concat(hex, "0");
return "#".concat(hex);
}
exports.randomHexColor = randomHexColor;
//# sourceMappingURL=hex-color.js.map
;