Skip to main content

A specified color image generator for Nonebot2

Project description

NoneBotPluginLogo

NoneBotPluginText

NoneBot-Plugin-Color

✨ 用于生成指定色彩图片的 NoneBot2 插件 ✨

python pdm-managed
license pypi pypi download

💿 安装

以下提到的方法 任选其一 即可

[推荐] 使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-color
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-color
pdm
pdm add nonebot-plugin-color
poetry
poetry add nonebot-plugin-color
conda
conda install nonebot-plugin-color

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分的 plugins 项里追加写入

[tool.nonebot]
plugins = [
    # ...
    "nonebot_plugin_color"
]

⚙️ 配置

🎉 使用

插件基于 pydanticColor 类解析颜色,详见 这里
当发送符合其格式的消息时,Bot 将会回复你一张颜色图片

也可以作为指令 color / 色图 的参数来使用

例子:

  • 颜色别名:yellow / / 黄色(插件对中文颜色别名做了特殊处理,支持的名称列表见 const.py
  • 十六进制(HEX):#ff0 / #ff0f / #ffff00 / #ffff00ff
  • CSS RGB / RGBA:rgb(255, 255, 0) / rgba(255, 255, 255, 1)
  • CSS HSL:hsl(60, 100%, 50%) / hsl(60, 100%, 50%, 1)
哎哟这个色啊!好色!

色图来咯

💡 鸣谢

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_color-0.2.0.tar.gz (70.5 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_color-0.2.0-py3-none-any.whl (70.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page