hex-to-rgb
Convert a hex color (e.g. #ff8800) to RGB and RGBA channel values. Accepts 3-, 4-, 6-, and 8-digit hex with or without the leading #.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"hex": "<hex>"
},
"name": "hex-to-rgb"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hex | Yes | Hex color string. Accepts #RGB, #RGBA, #RRGGBB, #RRGGBBAA, or the same forms without the leading #. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | Alpha channel (0-1, defaults to 1 if not present in input). | |
| b | Yes | Blue channel (0-255). | |
| g | Yes | Green channel (0-255). | |
| r | Yes | Red channel (0-255). | |
| rgb | Yes | CSS rgb() string. | |
| rgba | Yes | CSS rgba() string. | |
| hex_normalized | Yes | Normalized 6-digit hex string with leading #. |