Skip to main content

四叶的颜色管理工具

Project description

FovesColor

包括一系列和颜色相关的工具。

可使用 pip 安装或下载源码使用:

pip install FovesColor

项目主页: https://github.com/Foves7017/FovesLib

hsl_to_rgb(h, s, l)

将 HSL 颜色转换为 RGB。

参数 类型 范围 说明
h int 0–360 色相
s int 0–100 饱和度
l int 0–100 亮度

返回 tuple[int, int, int],每个分量范围 0–255。

rgb_tuple_to_hex(rgb)

将 RGB 元组转换为 #RRGGBB 十六进制字符串。支持单个和批量——传入列表自动返回列表。

参数 类型 说明
rgb tuple[int,int,int] 单个 RGB 颜色
rgb list[tuple[int,int,int]] 批量 RGB 颜色

返回 str(单个)或 list[str](批量)。

color_whell(split, s, l)

将色轮均分为 split 等份,按指定饱和度和亮度生成 RGB 颜色列表。

参数 类型 范围 说明
split int ≥1 色轮分割份数
s int 0–100 饱和度
l int 0–100 亮度

返回 list[tuple[int, int, int]]

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

fovescolor-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fovescolor-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file fovescolor-0.1.0.tar.gz.

File metadata

  • Download URL: fovescolor-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for fovescolor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 19ae670361e728bc5c893efcc46bb49b1f59d4c8631738b87d0a9dec1b82f629
MD5 e2186b0082459fc0464566e97c04aba8
BLAKE2b-256 c28fb92f465bb00ad6ae20f537170df539222296716085c72bc6705fb716af13

See more details on using hashes here.

File details

Details for the file fovescolor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fovescolor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for fovescolor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c741d0ca71f14c28c942cbd147a69829cf94af6047a722fc4c2e575d6c2edbd
MD5 91d223246b58a5bfda2d8d3d439a6714
BLAKE2b-256 f67e9072de601117635e530b7eecb3c3c216af089e1a2aae372431ba0a3229fc

See more details on using hashes here.

Supported by

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