I visited the page https://www.postgresql.org/about/contributing/ and happened to have the dark theme enabled. I noticed that some logos don't look terribly nice there; it's pretty clear that some of them are intended to have a light background instead. Maybe a simple fix would be to add a light background to the table cell where the logo is displayed?
I'd suggest just making it a requirement to add an inline style onto the img.organization-logo element and consider the underlying style as part of the "data" for the logo. The sponsor can specify their preference if desired, otherwise we pick one that looks good in either mode (the logo clarity itself wouldn't change but how well it blends in can be tweaked.)