The function to use for detecting the color level
import { setColorDetector, ColorLevel } from "@nevware21/chromacon";
setColorDetector(() => {
// Custom detection logic
return ColorLevel.TrueColor;
});
// Check if the terminal supports true color
if (isTrueColorSupported()) {
console.log("True color is supported");
}
// Reset to automatic detection
setColorDetector();
Manually set the color detector function to use for detecting the color level. If the function is not provided, the default automatic detection will be used.