https://xxyh.xiaoli.icu/api/p_github_badge.phphttps://xxyh.xiaoli.icu/api/p_github_badge.php?label=build&message=passing&color=brightgreen&style=flat生成 GitHub shields 风格的 SVG 徽章,返回 image/svg+xml,可直接写进 README 的 markdown 图片语法。
label 为左侧灰色区文字,message 为右侧彩色区文字,color 支持 brightgreen/green/yellow/orange/red/blue/grey 等预设名或 #RRGGBB,style 取 flat(圆角)或 plastic(直角)。中文按 12px、ASCII 按 6.6px 估算宽度,自动适配。
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
label |
string | 选填 | build | 左侧文字,默认 build |
message |
string | 选填 | passing | 右侧文字,默认 passing |
color |
string | 选填 | brightgreen | 预设颜色名或 #RRGGBB |
style |
string | 选填 | flat | flat 或 plastic |
https://xxyh.xiaoli.icu/api/p_github_badge.php
此处将显示接口返回结果…
直接返回 image/svg+xml(<svg>…</svg>),不是 JSON。
—