← 返回
开发者工具 中文

Colorlab

Convert colors and generate palettes with WCAG contrast checks. Use when building palettes, converting hex/RGB, checking accessibility.
转换颜色并生成调色板,包含 WCAG 对比度检查。适用于构建调色板、转换 hex/RGB 及检查无障碍合规性。
bytesagain3
开发者工具 clawhub v3.0.0 2 版本 99837.9 Key: 无需
★ 0
Stars
📥 616
下载
💾 4
安装
2
版本
#latest

概述

ColorLab — Color Tool

Convert colors, generate palettes, check WCAG contrast ratios, and find closest CSS color names. Uses printf and awk for calculations, with ANSI 24-bit color swatches in terminal output.

Commands

CommandDescription
----------------------
hex-to-rgb Convert hex color to RGB values
rgb-to-hex Convert RGB values (0-255) to hex
contrast Calculate WCAG 2.0 contrast ratio with AA/AAA pass/fail ratings
palette [count]Generate lighter and darker variants of a color (default: 5 each direction)
random [count]Generate random colors with hex and RGB values (default: 1)
name Find the closest named CSS color (from ~50 common colors)

Examples

# Convert hex to RGB
colorlab hex-to-rgb "#FF5733"    # → rgb(255, 87, 51)

# Convert RGB to hex
colorlab rgb-to-hex 255 87 51    # → #FF5733

# Check contrast for accessibility
colorlab contrast "#FFFFFF" "#000000"
# → 21.00:1, WCAG AA/AAA all pass

# Generate a palette
colorlab palette "#3498db" 3
# → Shows 3 darker + base + 3 lighter variants with color swatches

# Random colors
colorlab random 5

# Find closest CSS color name
colorlab name "#e74c3c"          # → Crimson

Notes

  • Hex colors accept # prefix (optional) and 3-digit shorthand (#F00#FF0000)
  • WCAG contrast checks report AA/AAA compliance for normal and large text
  • Palette output includes ANSI 24-bit color swatches (requires a modern terminal)
  • Color naming uses Euclidean distance in RGB space against ~50 common CSS color names

版本历史

共 2 个版本

  • v3.0.0 当前
    2026-03-29 17:35 安全 安全
  • v1.0.4
    2026-03-19 09:37

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,417
productivity

Thesis Helper

bytesagain3
论文写作助手。论文大纲生成、文献综述框架、摘要生成、引用格式转换、格式规范检查、答辩准备。Thesis helper with outline generation, literature review, abstract writing,
★ 1 📥 3,509
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,465