Function evaluateColorSimilarity

  • Evaluates the similarity of a set of colors.

    Parameters

    • colors: string[]

    Returns number

    A similarity score between 0 and 1, where 0 indicates all colors are distinct and 1 indicates all are similar.

    evaluateColorSimilarity(['#ffffff', '#fffffe']);
    // => value close to 1