JavaScript file for color sensor