Closed cymplecy closed 5 years ago
Maybe don't expose parseInt or Number directly - just have a block with 2 dropdowns - xxx hex/dev/binary to hex/dec/binary
Just keep to dec, hex and binary (octal is so 1970's :) )
accept 0x and # (or no prefix) as valid hex prefixes - similar for binary
Withdrawn
When dealing with colours in RGB hex format #FF00FF for magenta etc, I find myself needing to translate them into seperate R, G and B values.
In current JS function mode I do stuff like this
but currently if I want to do the same in Blockly I have to write my own function to replace parseInt (which I've done successfully)
So I'm wondering if
Does core Blockly already have such a function written?
If it doesn't - can one be written (obviously yes)
But either way, should some requests like this be added into the Blockly node or should it stick to basic functions and methods.?
e.g just because we can do it - should we do it?
Simon