js light and colour conversion