color_nearest
Map any color to the nearest Pebble GColor, and check contrast and legibility against an optional background.
Instructions
Nearest of the 64 Pebble GColors to an arbitrary color.
Args:
color: a hex string ("#RRGGBB" / "RRGGBB" / shorthand) or an
"r,g,b" triple.
background: optional background color; when given, the contrast ratio
and legibility of the matched color on it are also reported.
Returns the matched GColor name, hex, C constant, packed ARGB8 byte, sunlight-corrected display hex, and sRGB distance to the input.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | ||
| background | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||