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