remove isColored, optimize file extension extraction