Needs to be tested, but https://github.com/chalk/chalk/pull/433#issuecomment-822165839 outlines how you would short-circuit between the two conversions.