in proc ::ico::getAndMaskFromColors {colors}
Padding calculation might look better like this:
append l [string repeat 0 [expr {(32 - ([string length $l] % 32))%32}]]