Repaired the javascript for rgb