MCPcopy Create free account
hub / github.com/melonjs/melonJS / parseTintColor

Function parseTintColor

packages/melonjs/src/level/tiled/TMXUtils.js:110–115  ·  view source on GitHub ↗
(tintcolor)

Source from the content-addressed store, hash-verified

108 * @returns {Color|undefined} parsed Color, or undefined if no tint
109 */
110export function parseTintColor(tintcolor) {
111 if (typeof tintcolor !== "undefined") {
112 return colorPool.get().parseHex(tintcolor, true);
113 }
114 return undefined;
115}
116
117// pre-compiled regex for #ARGB → #RGBA color conversion
118// matches #ARGB (5 chars) or #AARRGGBB (9 chars)

Callers 3

readImageLayerFunction · 0.90
getObjectsMethod · 0.90
tmxtilemap.spec.jsFile · 0.90

Calls 2

parseHexMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected