How To: Change a Hex Color With PHP
I wanted to use the hex value set in the customizer to create a new adjusted hex value that could be used for lightening and darkening the color.
The solution was to use a PHP funtion to determine what the adjusted value would be.
This function takes two parameters, $hex and $adjustment.
$hex should be set to the hex value you want to change.
$adjustment should indicate how much you want to lighten or darken you hex value. This parameter takes a value between 255 and -255 to make the hex value adjustment. Positive numbers are lighter, negative numbers are darker.