UNPKG

@atlaskit/tokens

Version:

Design tokens are the single source of truth to name and store design decisions.

13 lines (12 loc) 286 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAlpha = getAlpha; function getAlpha(hex) { if (hex.length === 9) { var int = parseInt(hex.slice(7, 9), 16) / 255; return Number(parseFloat(int.toString()).toFixed(2)); } return 1; }