Skip to main content

darken_color()

public static function darken_color( $color, $darken_amount, $format='hex' )

Darken a given color string by a specific amount.

Since: 2.7

Source: common.php:8049

Parameters

NameTypeDefaultDescription
$colorstringThe color string to modify, as a hex code (either 3 or 6 digits).
$darken_amountfloatThe amount by which to modify the color, in steps.
$formatstring'hex'The format in which to return the color (hex or rgb)

Returns

  • mixed