MCPcopy Create free account
hub / github.com/alignoth/alignoth / tf

Function tf

resources/vega.min.js:9065–9124  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

9063 return this.rgb().formatRgb();
9064 }
9065 function tf(t) {
9066 var e, n;
9067 return (
9068 (t = (t + "").trim().toLowerCase()),
9069 (e = Wc.exec(t))
9070 ? ((n = e[1].length),
9071 (e = parseInt(e[1], 16)),
9072 6 === n
9073 ? ef(e)
9074 : 3 === n
9075 ? new af(
9076 ((e >> 8) & 15) | ((e >> 4) & 240),
9077 ((e >> 4) & 15) | (240 & e),
9078 ((15 & e) << 4) | (15 & e),
9079 1,
9080 )
9081 : 8 === n
9082 ? nf(
9083 (e >> 24) & 255,
9084 (e >> 16) & 255,
9085 (e >> 8) & 255,
9086 (255 & e) / 255,
9087 )
9088 : 4 === n
9089 ? nf(
9090 ((e >> 12) & 15) | ((e >> 8) & 240),
9091 ((e >> 8) & 15) | ((e >> 4) & 240),
9092 ((e >> 4) & 15) | (240 & e),
9093 (((15 & e) << 4) | (15 & e)) / 255,
9094 )
9095 : null)
9096 : (e = Hc.exec(t))
9097 ? new af(e[1], e[2], e[3], 1)
9098 : (e = Yc.exec(t))
9099 ? new af(
9100 (255 * e[1]) / 100,
9101 (255 * e[2]) / 100,
9102 (255 * e[3]) / 100,
9103 1,
9104 )
9105 : (e = Gc.exec(t))
9106 ? nf(e[1], e[2], e[3], e[4])
9107 : (e = Vc.exec(t))
9108 ? nf(
9109 (255 * e[1]) / 100,
9110 (255 * e[2]) / 100,
9111 (255 * e[3]) / 100,
9112 e[4],
9113 )
9114 : (e = Xc.exec(t))
9115 ? hf(e[1], e[2] / 100, e[3] / 100, 1)
9116 : (e = Jc.exec(t))
9117 ? hf(e[1], e[2] / 100, e[3] / 100, e[4])
9118 : Zc.hasOwnProperty(t)
9119 ? ef(Zc[t])
9120 : "transparent" === t
9121 ? new af(NaN, NaN, NaN, 0)
9122 : null

Callers 3

rfFunction · 0.85
dfFunction · 0.85
ghFunction · 0.85

Calls 3

efFunction · 0.85
nfFunction · 0.70
hfFunction · 0.70

Tested by

no test coverage detected