screen.screen.color_offset
Declaration
lua
screen.color_offset(color1, color2)
Description
Calculate per-channel absolute difference between two colors.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
color1 | integer | Required | — | First color 0xRRGGBB |
color2 | integer | Required | — | Second color 0xRRGGBB |
Return Values
| Type | Description |
|---|---|
| integer | Packed offset 0xRRGGBB where each channel = |c1-c2| |
Example
lua
local off = screen.color_offset(0xFF8040, 0xFE7F3F)