diff --git a/modules/Calendar/views/TaskManagement.php b/modules/Calendar/views/TaskManagement.php
index 8081ef89312cfaea53675ed1bef99dd7cb2ae142..0ce8227307d238121df3cb0e74cfd037aeba5f01 100644
--- a/modules/Calendar/views/TaskManagement.php
+++ b/modules/Calendar/views/TaskManagement.php
@@ -118,7 +118,8 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View {
 			}
 		}
 		if($color=='#ffffff' || empty($color)) {
-			$color = '#'.dechex(rand(0x000000, 0xFFFFFF));
+			$color = '#' . str_pad(dechex(rand(0, 50)), 2, '0') . str_pad(dechex(rand(0, 50)), 2, '0') . str_pad(dechex(rand(0, 50)), 2, '0');
+
 		}
 		return $color;
 	}