https://xxyh.xiaoli.icu/api/p_palette.phphttps://xxyh.xiaoli.icu/api/p_palette.php?color=%235b8cff&mode=analogicmode=mono 单色明暗梯度、analogic 邻近色、complement 互补色,默认邻近色。
返回每组颜色的 HEX 与 HSL 数值,可直接写进 CSS 变量。
做主题、海报、图表配色时先用它拉一组,再人工微调,比在拾色器里反复试快。
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
color |
string | 选填 | #5b8cff | 主色 |
mode |
string | 选填 | analogic | mono / analogic / complement |
https://xxyh.xiaoli.icu/api/p_palette.php
此处将显示接口返回结果…
{
"code": 200,
"msg": "ok",
"data": {
"base": "#5b8cff",
"mode": "analogic",
"colors": [
{ "hex": "#5b8cff", "hsl": [222, 100, 68] },
{ "hex": "#5bbaff", "hsl": [202, 100, 68] }
]
}
}
—