Changes for truecolor extension. Thanks Johann Klammer