I bought a bag of walnuts from the local farmers market (in NZ), but some of them are dark colored on the outside and almost black inside. Is this normal and are they ok to eat?
Also noticed some of them are slightly open.
I'm not sure what causes it and what food safety issues may be involved but I used to have a walnut tree and got a few from time to time that looked like that. I had a small taste once and they were really bad, not worth keeping. I'd put it down to some sort of rot and I live in Tasmania with a relatively similar climate.
Looking for a reference on common causes the best I've been able to find is from "Diseases of Temperate Zone Tree Fruit and Nut Crops" by Joseph M. Ogawa and Harley English that has a section on kernel mold of the English Walnut, which I'm guessing is the most common variety in New Zealand. This is from a Google book preview that I can't copy / paste so I'm skipping over some parts probably not relevant using an ellipsis:
The book is available for limited preview / purchase for anyone further interested in the topic, but I think the short answer is they'll taste nasty (regardless of any safety issues) so probably best disposed of and maybe complain to the supplier if you got too many in that state and ask for their comment.