For colored or pale leather bags…Pretreat the leather with a stain-proofing product when you first get your bag. This will help prevent transferring dye (from colored bags to light clothing, and from dark clothing to pale bags). As an extra precaution, wash dark denim several times before wearing it with your bag so it’s less likely to rub off.
For canvas or fabric bags…Spot-treat stains without over-wetting them (too much water can create a ring). If you want to machine-wash your bag, wipe with a damp cloth first so you can see if the color bleeds. Always dry flat.