Get the distance between 2 RGB pairs (alpha is ignored)
| 67 | |
| 68 | // Get the distance between 2 RGB pairs (alpha is ignored) |
| 69 | long Color::GetDistance(long R1, long G1, long B1, long R2, long G2, long B2) |
| 70 | { |
| 71 | long rmean = ( R1 + R2 ) / 2; |
| 72 | long r = R1 - R2; |
| 73 | long g = G1 - G2; |
| 74 | long b = B1 - B2; |
| 75 | return sqrt((((512+rmean)*r*r)>>8) + 4*g*g + (((767-rmean)*b*b)>>8)); |
| 76 | } |
| 77 | |
| 78 | // Generate JSON string of this object |
| 79 | std::string Color::Json() const { |
nothing calls this directly
no outgoing calls
no test coverage detected