Changeset 534 for trunk/lib/Utilities.inc.php
- Timestamp:
- Jul 27, 2015 7:56:08 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Utilities.inc.php
r532 r534 275 275 * @return string A hexadecimal html color. 276 276 */ 277 function getTextColor($text, $method=1 )277 function getTextColor($text, $method=1, $n=0.87) 278 278 { 279 279 $hash = md5($text); … … 291 291 default : 292 292 // Reduce all hex values slightly to avoid all white. 293 array_walk($rgb, create_function('&$v', '$v = dechex(round(hexdec($v) * 0.87));'));293 array_walk($rgb, create_function('&$v', "\$v = dechex(round(hexdec(\$v) * $n));")); 294 294 break; 295 295 case 2 :
Note: See TracChangeset
for help on using the changeset viewer.