MCPcopy Index your code
hub / github.com/diffgram/diffgram / HexToRGBA

Function HexToRGBA

frontend/src/utils/colorUtils.js:237–247  ·  view source on GitHub ↗
(hex)

Source from the content-addressed store, hash-verified

235}
236
237function HexToRGBA(hex) {
238 var rgba = (0, chunk)(hex.slice(1), 2).map(function (c) {
239 return parseInt(c, 16);
240 });
241 return {
242 r: rgba[0],
243 g: rgba[1],
244 b: rgba[2],
245 a: Math.round(rgba[3] / 255 * 100) / 100
246 };
247}
248
249function HexToHSVA(hex) {
250 var rgb = HexToRGBA(hex);

Callers 2

HexToHSVAFunction · 0.85
parseGradientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected