skills/built-in/color-tools/SKILL.md
Work with colors: convert between HEX/RGB/HSL, build palettes, find complementary/analogous colors, and check text contrast for accessibility (WCAG). Use when users ask to convert a color, lighten/darken it, build a color scheme, or check if a color combo is readable. Triggers on mentions of color, colour, hex, rgb, hsl, palette, contrast, complementary, shade, 颜色, 配色, 色值, 对比度, 调色板.
npx skillsauth add microclaw/microclaw color-toolsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Compute color math; don't eyeball hex values.
python3 - <<'PY'
import colorsys
def hex_to_rgb(h): h=h.lstrip('#'); return tuple(int(h[i:i+2],16) for i in (0,2,4))
def rgb_to_hex(r,g,b): return '#%02x%02x%02x'%(r,g,b)
r,g,b = hex_to_rgb('#3b82f6')
h,l,s = colorsys.rgb_to_hls(r/255,g/255,b/255)
print('rgb', (r,g,b))
print('hsl', (round(h*360), round(s*100), round(l*100)))
print('hex', rgb_to_hex(r,g,b))
PY
python3 - <<'PY'
import colorsys
def adjust(hex_, dl):
h=hex_.lstrip('#'); r,g,b=(int(h[i:i+2],16)/255 for i in (0,2,4))
H,L,S=colorsys.rgb_to_hls(r,g,b); L=max(0,min(1,L+dl))
r,g,b=colorsys.hls_to_rgb(H,L,S); return '#%02x%02x%02x'%(int(r*255),int(g*255),int(b*255))
print('lighter', adjust('#3b82f6', +0.15))
print('darker ', adjust('#3b82f6', -0.15))
PY
python3 - <<'PY'
def lin(c): c/=255; return c/12.92 if c<=0.03928 else ((c+0.055)/1.055)**2.4
def lum(h): h=h.lstrip('#'); r,g,b=(int(h[i:i+2],16) for i in (0,2,4)); return 0.2126*lin(r)+0.7152*lin(g)+0.0722*lin(b)
def ratio(a,b): L1,L2=sorted([lum(a),lum(b)],reverse=True); return (L1+0.05)/(L2+0.05)
r=ratio('#ffffff','#3b82f6'); print(f'contrast {r:.2f}:1', '(AA body needs >=4.5)')
PY
documentation
Improve or write prose: tighten, clarify, fix grammar, and adjust tone/length while preserving the author's voice and meaning. Use when users ask to edit, proofread, rewrite, polish, shorten, or change the tone of text, or to draft something from notes. Triggers on mentions of edit, proofread, rewrite, polish, tighten, make it shorter/clearer/more formal, fix grammar, 润色, 改写, 校对, 修改, 精简, 改语气, 帮我写.
development
Look up a quick factual summary of a topic, person, place, or thing from Wikipedia via its public REST API (no API key). Use when users want a concise overview, 'who/what is X', background, or a definition-level explanation of a named entity. Triggers on mentions of who is, what is, tell me about, overview of, background on, wikipedia, 是谁, 是什么, 介绍一下, 简介, 维基.
testing
Convert between units of measurement precisely: length, mass/weight, temperature, area, volume, speed, data sizes, and time. Use when users ask to convert X to Y, 'how many cm in an inch', 'what's 70F in C', 'GB to MB', or mix metric and imperial. Triggers on mentions of convert, conversion, in inches/cm/km/miles, kg/lb, Celsius/Fahrenheit, 换算, 转换, 多少厘米, 多少公斤, 摄氏, 华氏.
development
Translate text between languages naturally, preserving meaning, tone, and formatting, with notes on nuance or ambiguity when it matters. Use when users ask to translate text, say something in another language, or localize a message. Triggers on mentions of translate, in English/Chinese/Spanish/Japanese/etc, how do you say, localize, 翻译, 译成, 用英文怎么说, 中译英, 英译中, 本地化.