0

I am scanning a Rubik cube by mobile camera. I am getting the colors of the sides, but even same colors have slightly different color value. Is there a way to detect this ?

  • 1
    Possible duplicate of [How to compare two colors for similarity/difference](https://stackoverflow.com/questions/9018016/how-to-compare-two-colors-for-similarity-difference) – Patt Mehta Mar 23 '18 at 09:22
  • Do you have any code to show so we can start helping? – Ryanas Mar 23 '18 at 09:43
  • @RyanSingh: Yes i wrote this basic one bool IsApproxColor (int j, Color32 col) { bool tmp = (col.r > GameConstants.GetColor (j).r - 30) && (col.r < Color(j).r + 30) && (col.g > Color (j).g - 30) && col.g < (Color (j).g + 30) && (col.b > Color (j).b - 30) && (col.b < Color (j).b + 30); return tmp; } – Abhishek Wankhede Mar 23 '18 at 10:14

0 Answers0