glfun: object colour based on charge