RTC:Fix RegEx quotes and Optimize Gradient Conversion Loop