Script Report color format error

I already tried the same but its not working, it was working on v10, but now i am trying to do in v12.