function($color) { if (is_null($color)) { $this->throwError('color expected for red()'); } return $color[1]; }