What is the amount of property sales amount can I donate to 501c3 to offset how much I pay federal?

I sold a single family rental in Colorado in 2022. I am a resident of Colorado. I need some insight as to any information about balancing the capital gains amount of $273k gain I can put towards a 501c3.

I have a guess that the tax owed is in the ballpark of $50k. Can I donate all of that to charity and not pay the fed?

Probably a pipe dream but if I have to pay then I would like to add a little power to my outgoing cash flow.

I thought I would ask this question before I start preparing and entering for 2022 which would take an amount of time that would detract from any expedient answer here.

Thank you for any advice, guidance or leadership in this issue.