Add function for std_dev_by_rgb