fixed bug when trimming transparent colors