isSimilar

fun Color.isSimilar(other: Color, maxDelta: Double = 3.0): Boolean

Compares colors using CIE2000 deltaE formula

Rule of thumb:

  • 0: Same color

  • (0, 1.0]: Basically the same color

  • (1.0 to 3.0]: Maybe some slight differences, but still the same color

  • (3.0 to 5.0]: Noticeably different

  • 5.0+: Different colors

Return

true if difference is within maxDelta