mqscript_findcolor
Locate specified colors within a defined screen region using color deviation and similarity settings for mobile automation tasks.
Instructions
Find color in specified region with support for multiple colors, color deviation, and similarity
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bottom | No | Bottom boundary of search region (0 for full screen) | |
| colorValue | Yes | Color value in BBGGRR format, multiple colors separated by |, deviation with - (e.g., "FFFFFF-101010|123456") | |
| direction | No | Search direction: 0=top-left to bottom-right, 1=center outward, 2=bottom-right to top-left, 3=bottom-left to top-right, 4=top-right to bottom-left | |
| left | No | Left boundary of search region (0 for full screen) | |
| resultVariable | No | Variable name to store result index | result |
| right | No | Right boundary of search region (0 for full screen) | |
| similarity | No | Color similarity (0-1, higher is more similar) | |
| top | No | Top boundary of search region (0 for full screen) | |
| xVariable | No | Variable name to store found X coordinate | intX |
| yVariable | No | Variable name to store found Y coordinate | intY |
Input Schema (JSON Schema)
{
"properties": {
"bottom": {
"default": 0,
"description": "Bottom boundary of search region (0 for full screen)",
"type": "number"
},
"colorValue": {
"description": "Color value in BBGGRR format, multiple colors separated by |, deviation with - (e.g., \"FFFFFF-101010|123456\")",
"type": "string"
},
"direction": {
"default": 0,
"description": "Search direction: 0=top-left to bottom-right, 1=center outward, 2=bottom-right to top-left, 3=bottom-left to top-right, 4=top-right to bottom-left",
"type": "number"
},
"left": {
"default": 0,
"description": "Left boundary of search region (0 for full screen)",
"type": "number"
},
"resultVariable": {
"default": "result",
"description": "Variable name to store result index",
"type": "string"
},
"right": {
"default": 0,
"description": "Right boundary of search region (0 for full screen)",
"type": "number"
},
"similarity": {
"default": 0.9,
"description": "Color similarity (0-1, higher is more similar)",
"type": "number"
},
"top": {
"default": 0,
"description": "Top boundary of search region (0 for full screen)",
"type": "number"
},
"xVariable": {
"default": "intX",
"description": "Variable name to store found X coordinate",
"type": "string"
},
"yVariable": {
"default": "intY",
"description": "Variable name to store found Y coordinate",
"type": "string"
}
},
"required": [
"colorValue"
],
"type": "object"
}