Color Converter Tool Description Convert colors between different formats (HEX, RGB, HSL, HSV, CMYK) and generate color palettes. Trigger - command - User needs color conversion - User wants to generate palettes Usage Tags , , , , Compatibility - Codex: ✅ - Claude Code: ✅ ---

, color_str):\n return hex_to_rgb(color_str)\n \n return None\n\ndef generate_palette(rgb, palette_type='complementary'):\n \"\"\"Generate color palette.\"\"\"\n r, g, b = rgb\n h, s, v = colorsys.rgb_to_hsv(r/255, g/255, b/255)\n \n colors = []\n if palette_type == 'complementary':\n colors = [(h, s, v), ((h + 0.5) % 1, s, v)]\n elif palette_type == 'triadic':\n colors = [(h, s, v), ((h + 1/3) % 1, s, v), ((h + 2/3) % 1, s, v)]\n elif palette_type == 'analogous':\n colors = [((h - 1/12) % 1, s, v), (h, s, v), ((h + 1/12) % 1, s, v)]\n elif palette_type == 'split':\n colors = [(h, s, v), ((h + 5/12) % 1, s, v), ((h + 7/12) % 1, s, v)]\n \n result = []\n for h2, s2, v2 in colors:\n r2, g2, b2 = colorsys.hsv_to_rgb(h2, s2, v2)\n result.append((int(r2*255), int(g2*255), int(b2*255)))\n return result\n\ndef main():\n parser = argparse.ArgumentParser(description=\"Convert colors\")\n parser.add_argument('color', nargs='?', help='Color to convert')\n parser.add_argument('--palette', '-p', choices=['complementary', 'triadic', 'analogous', 'split'])\n parser.add_argument('--list', '-l', action='store_true', help='List named colors')\n args = parser.parse_args()\n \n if args.list:\n print(\"Use HEX (#FF5733) or RGB (rgb(255,87,51)) format\")\n return\n \n if not args.color:\n parser.error(\"Provide a color\")\n \n rgb = parse_color(args.color)\n if not rgb:\n print(f\"Error: Cannot parse color: {args.color}\", file=sys.stderr)\n sys.exit(1)\n \n r, g, b = rgb\n hex_color = rgb_to_hex(r, g, b)\n hsl = rgb_to_hsl(r, g, b)\n hsv = rgb_to_hsv(r, g, b)\n \n print(f\"HEX: {hex_color}\")\n print(f\"RGB: rgb({r}, {g}, {b})\")\n print(f\"HSL: hsl({hsl[0]}, {hsl[1]}%, {hsl[2]}%)\")\n print(f\"HSV: hsv({hsv[0]}, {hsv[1]}%, {hsv[2]}%)\")\n \n if args.palette:\n palette = generate_palette(rgb, args.palette)\n print(f\"\\n{args.palette.title()} palette:\")\n for c in palette:\n print(f\" {rgb_to_hex(*c)} - rgb{c}\")\n\nif __name__ == \"__main__\":\n main()\n","content_type":"text/x-python; charset=utf-8","language":"python","size":3414,"content_sha256":"e9a47c3aaebd4498a74171964a0dddb31f6eb139f182ee47ae0aa105a5aacc81"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Color Converter Tool","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Description","type":"text"}]},{"type":"paragraph","content":[{"text":"Convert colors between different formats (HEX, RGB, HSL, HSV, CMYK) and generate color palettes.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Trigger","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"/color","type":"text","marks":[{"type":"code_inline"}]},{"text":" command","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User needs color conversion","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User wants to generate palettes","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Usage","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Convert HEX to RGB\npython scripts/color_converter.py \"#FF5733\"\n\n# Convert RGB to HEX\npython scripts/color_converter.py \"rgb(255,87,51)\"\n\n# Generate palette\npython scripts/color_converter.py \"#FF5733\" --palette complementary\n\n# List named colors\npython scripts/color_converter.py --list","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Tags","type":"text"}]},{"type":"paragraph","content":[{"text":"color","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"hex","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"rgb","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"hsl","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"palette","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Compatibility","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Codex: ✅","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Claude Code: ✅","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"color-converter","author":"@skillopedia","source":{"stars":80,"repo_name":"moyucode","origin_url":"https://github.com/aidotnet/moyucode/blob/HEAD/skills/tools/color-converter/SKILL.md","repo_owner":"aidotnet","body_sha256":"f51f8be3aac793adf843b619dd5e3894c7966c55b7dd74581bf6b60e4eb94e1b","cluster_key":"3c9681d4f8e05835c2d1806a08ddf550e066970a64e6ac2aa6944317b1898202","clean_bundle":{"format":"clean-skill-bundle-v1","source":"aidotnet/moyucode/skills/tools/color-converter/SKILL.md","attachments":[{"id":"a6dc6030-8759-5720-9d0e-53dfa9251867","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a6dc6030-8759-5720-9d0e-53dfa9251867/attachment.py","path":"scripts/color_converter.py","size":3414,"sha256":"e9a47c3aaebd4498a74171964a0dddb31f6eb139f182ee47ae0aa105a5aacc81","contentType":"text/x-python; charset=utf-8"}],"bundle_sha256":"8bd2690d6780fdb8ed73ef5fbdecadfb316340a384d97fb79283ed70f5f16427","attachment_count":1,"text_attachments":1,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/tools/color-converter/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"general","category_label":"General"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"general","metadata":{"short-description":"转换颜色格式"},"import_tag":"clean-skills-v1","description":"在HEX、RGB、HSL、HSV和CMYK格式之间转换颜色,支持调色板生成。"}},"renderedAt":1782989271341}

Color Converter Tool Description Convert colors between different formats (HEX, RGB, HSL, HSV, CMYK) and generate color palettes. Trigger - command - User needs color conversion - User wants to generate palettes Usage Tags , , , , Compatibility - Codex: ✅ - Claude Code: ✅ ---