Dart port of https://www.npmjs.org/package/supports-color