@OPEN-KAPPA/COLORS
    Preparing search index...

    @open-kappa/colors is designed with performance in mind, utilizing optimized mathematical paths and minimizing object allocation where possible.

    We include a comprehensive benchmark suite leveraging the Bun runtime. To measure performance on your specific hardware:

    bun run bench
    
    • Conversions: . Accessing the generic to() method has a slight overhead compared to direct instantiation due to the XYZ intermediate step.
    • Clustering: The K-Means implementation is where is pixels, is clusters, and is iterations. For large images, consider downsampling first.
    • Tone Mapping: per color. Safe to use in real-time loops (e.g., canvas rendering).