implementing color adjustment function