From https://github.com/colored-rs/colored/pull/196#issuecomment-2778595339
From #196 (comment)