Skip to content

8.0.0 (July 15, 2026)

Latest

Choose a tag to compare

@silkfire silkfire released this 15 Jul 10:55

BREAKING CHANGES

  • The useLegacy parameter of the ConsoleColor overloads has been renamed to useWebColors. Code that passes it by name has to be updated; the colours it produces are unchanged.
  • An undefined ConsoleColor value now throws an ArgumentOutOfRangeException instead of a KeyNotFoundException.

Bug fixes

  • Fixed a crash on .NET Framework when a color string ended with a reset escape sequence followed by a partial one, e.g. "\x1b[0m\x1b["
  • NO_COLOR is now only honored when it is non-empty, as the specification requires
  • The exception thrown for an invalid hexadecimal color value now names the parameter that callers actually pass (hexColor)
  • A denied registry read while detecting a CI/CD environment no longer takes the library down with a TypeInitializationException
  • The DisableRuntimeMarshalling assembly attribute is now actually applied on .NET 8 and .NET 9; its build condition had silently never matched

Performance

Allocations are down for every overload except the nested case, which is unchanged. Measured on .NET 9 with both versions loaded into the same process:

Method 7.0.1 8.0.0
Pastel(Color) 120 B 96 B -20%
Pastel(ConsoleColor) 88 B 64 B -27%
Pastel(hex) 120 B 96 B -20%
Pastel(Color), nested 184 B 184 B —

Throughput is a few percent better across the board, but the margin is close enough to the measurement noise that the allocation figures above are the meaningful ones.

General

  • The ConsoleColor colour mapping is now documented as the combined CSS3 list, which is why DarkGray (#A9A9A9) is deliberately lighter than Gray (#808080)