请参考下面的算法,类似于求方差
//调用示例MsgBox 颜色相似("fe3333","ff3333", 0.9)
Function 颜色相似(当前颜色, 对比颜色, 相似度)//相似度为0到1之间的数If 0<=相似度<=1 thenCall Plugin.Color.ColorToRGB(当前颜色, R1, G1, B1)Call Plugin.Color.ColorToRGB(对比颜色, R2, G2, B2)If abs(R1 - R2) < 255 * (1 - 相似度) and abs(G1 - G2) < 255 * (1 - 相似度) and abs(B1 - B2) < 255 * (1 - 相似度) Then 颜色相似 = "相似"Else 颜色相似 = "不相似"End IfElse 颜色相似 = "相似度出错"End ifEnd Function