forked from SocialSisterYi/bilibili-API-collect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(picture.md): @.avg_color (SocialSisterYi#893)
- Loading branch information
Showing
1 changed file
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
| width | 图片最大限制宽度 | | | ||
| high | 图片最大限制高度 | | | ||
| quality | 图片质量百分比 | 仅限webp | | ||
| format | 图片格式 | 仅限png/jpg/webp | | ||
| format | 图片格式 | 仅限png/jpg/webp/[avg_color](#avg_color格式说明) | | ||
|
||
**示例:** | ||
|
||
|
@@ -41,4 +41,40 @@ https://i1.hdslb.com/bfs/archive/[email protected] | |
|
||
https://i1.hdslb.com/bfs/archive/[email protected] | ||
|
||
![](https://i1.hdslb.com/bfs/archive/[email protected]) | ||
![](https://i1.hdslb.com/bfs/archive/[email protected]) | ||
|
||
|
||
## avg_color格式说明 | ||
|
||
当图片格式化输出格式为`avg_color`时 | ||
|
||
> \*.hdslb.com/bfs/\*/\*.*@\*.avg_color | ||
*请求方式:GET* | ||
|
||
**json回复:** | ||
|
||
根对象: | ||
|
||
| 字段 | 类型 | 内容 | 备注 | | ||
| ------ | ---- | ----------- | ------ | | ||
| RGB | str | 平均颜色值 | HEX | | ||
|
||
**示例:** | ||
|
||
获取 https://i1.hdslb.com/bfs/archive/e5fff1472bad1c0c6bcb3004205f9be23b58ffc0.jpg 的平均颜色值 | ||
|
||
```shell | ||
curl 'https://i1.hdslb.com/bfs/archive/[email protected]_color' | ||
``` | ||
|
||
<details> | ||
<summary>查看响应示例:</summary> | ||
|
||
```json | ||
{ | ||
"RGB": "#7d6f6c" | ||
} | ||
``` | ||
|
||
</details> |