Slice onions thinly and evenly
Heat a pan over medium-low heat
Add butter, oil, or both
Add the onions and a pinch of salt
Stir to coat the onions
Cook slowly, stirring every few minutes
Lower the heat if they start to brown too fast
Add a splash of water if the pan gets too dry
Continue cooking until the onions are soft, golden, and deeply browned
Cook for 30 to 60 minutes, depending on the amount and desired color
Remove from heat and use as desired
