Removed unused code and conberted rgb to hexa.