How to convert #BA1111 to RGB

How to convert #BA1111 to RGB and 2 to 8, 10 to 2, in as3 ,I will use toString(2), but in haxe, I don’t know。 please help me ,thanks.

See “intro” section of Readme

thank you! this is my need. but, There’s a bit of that I didn’t understand.
type Int not have hex, why this

public function toHex(prefix = “#”)
return ‘$prefix${red.hex(2)}${green.hex(2)}${blue.hex(2)}’;
function get_red(): Int
return (this >> 16) & 0xFF;

It’s from StringTools (StringTools - Haxe 4.2.1 API), using static extension (Static Extension (Language Features) - Haxe - The Cross-platform Toolkit)