MCPcopy Create free account
hub / github.com/CopterExpress/clover / parseColor

Function parseColor

clover_blocks/www/python.js:411–417  ·  view source on GitHub ↗
(color)

Source from the content-addressed store, hash-verified

409}
410
411function parseColor(color) {
412 return {
413 r: parseInt(color.substr(2, 2), 16),
414 g: parseInt(color.substr(4, 2), 16),
415 b: parseInt(color.substr(6, 2), 16)
416 }
417}
418
419const PARSE_COLOR = `def ${Blockly.Python.FUNCTION_NAME_PLACEHOLDER_}(color):
420 return {'r': int(color[1:3], 16), 'g': int(color[3:5], 16), 'b': int(color[5:7], 16)}`;

Callers 1

python.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected