_density = if (count _this > 1) then {_this select 1} else {0.07}; if (_density < 0) then {_density = 0.07}; _colorCoef = if (count _this > 2) then {_this select 2} else {1}; if (_colorCoef < 0) then {_density = 1};
_colorCoef can be negative causing color array to have negative values.