This is the fix for #36. It utilises lots of really expensive and really complicated algorithms (which make my head ache) to add lots of really fancy colours in most terminal emulators. The new option colorDistanceAlgorithm can be used to choose from several available algorithms:
cie76 (CIE76): The fastest algorithm.
ciede2000 (CIEDE2000): The most accurate algorithm.
cie94 (CIE94): An algorithm that is neither particularly fast nor particularly accurate. It’s the default since it provides a compromise between speed and accuracy.
none (not actually an algorithm): The formatter will leave it to the terminal emulator to pick a fitting colour on it’s own. Unfortunately most terminal emulators don't support this.
Since this requires so many colour-related functions (not just the colour distance algorithms themselves), I created a new class Luminous\Utils\ColorUtils for them.
This is the fix for #36. It utilises lots of really expensive and really complicated algorithms (which make my head ache) to add lots of really fancy colours in most terminal emulators. The new option
colorDistanceAlgorithm
can be used to choose from several available algorithms:cie76
(CIE76): The fastest algorithm.ciede2000
(CIEDE2000): The most accurate algorithm.cie94
(CIE94): An algorithm that is neither particularly fast nor particularly accurate. It’s the default since it provides a compromise between speed and accuracy.none
(not actually an algorithm): The formatter will leave it to the terminal emulator to pick a fitting colour on it’s own. Unfortunately most terminal emulators don't support this.Since this requires so many colour-related functions (not just the colour distance algorithms themselves), I created a new class
Luminous\Utils\ColorUtils
for them.