🔃 颜色反转(反色计算器)Invert Colors
输入 HEX、RGB、HSL 或颜色名,计算反色(255 减去每个 RGB 分量),同时给出色相旋转 180° 的互补色和对比度,可批量处理、一键复制。Enter HEX, RGB, HSL or color names to get the inverted color (255 minus each RGB channel), plus the 180° hue-rotated complement and contrast ratio — in bulk, with one-click copy.
使用说明与常见问题How-to & FAQ
「颜色反转(反色计算器)」是什么?What is the Invert Colors tool?
输入 HEX、RGB、HSL 或颜色名,计算反色(255 减去每个 RGB 分量),同时给出色相旋转 180° 的互补色和对比度,可批量处理、一键复制。Enter HEX, RGB, HSL or color names to get the inverted color (255 minus each RGB channel), plus the 180° hue-rotated complement and contrast ratio — in bulk, with one-click copy.
如何使用「颜色反转(反色计算器)」?How do I use the Invert Colors tool?
在「颜色反转(反色计算器)」中,在上方填写或选择所需内容,结果会实时显示在下方;所有处理都在浏览器本地完成。In the Invert Colors: Fill in or choose the options above and the result appears below instantly; everything runs locally in your browser.
反色是怎么计算的?How is the inverted color calculated?
把 RGB 每个分量用 255 减去:例如 #3B82F6 = (59, 130, 246),反色为 (196, 125, 9) = #C47D09。这和图片编辑软件的“反相”效果一致。透明度保持不变。Each RGB channel is subtracted from 255: #3B82F6 = (59, 130, 246) becomes (196, 125, 9) = #C47D09. This matches the Invert filter in image editors. Alpha is unchanged.
反色和互补色有什么区别?How is the inverse different from the complement?
反色同时翻转色相和明暗(浅蓝变深橙);互补色只把色相旋转 180°,保持饱和度和亮度不变(浅蓝变浅橙)。设计配色时通常用互补色,制作负片效果用反色。Inversion flips both hue and lightness (light blue becomes dark orange); the complement only rotates hue by 180° and keeps saturation and lightness (light blue becomes light orange). Use complements for color schemes and inversion for negative effects.
支持哪些输入格式?Which input formats are supported?
支持 #RGB、#RRGGBB、#RRGGBBAA、不带 # 的十六进制、rgb()/rgba()、hsl()/hsla() 以及 CSS 颜色名(如 tomato、navy),每行一个。#RGB, #RRGGBB, #RRGGBBAA, hex without #, rgb()/rgba(), hsl()/hsla() and CSS color names such as tomato or navy, one per line.
对比度一栏是什么意思?超出范围的值怎么处理?What does the contrast column mean, and what about out-of-range values?
对比度是原色和它的反色之间的 WCAG 对比度(1 : 1 到 21 : 1),只说明这两种颜色放在一起的区分程度,不代表你实际的文字和背景配色;计算时不考虑透明度,带透明度的行会标 *。rgb() 分量超出 0–255、hsl() 的饱和度或亮度超出 0–100%、透明度超出 0–1 时会报错,不会悄悄截断;色相按 CSS 规则绕圈(400° = 40°)。只由 0–9、a–f 组成的 3、6、8 位单词(如 bad、add)会按不带 # 的十六进制读取,并在结果上方提示。It is the WCAG contrast ratio (1:1 to 21:1) between the original color and its inverse. It only shows how distinct those two colors are and says nothing about your actual text and background pair. Alpha is ignored, and rows with transparency are marked *. rgb() values outside 0–255, hsl() saturation or lightness outside 0–100% and alpha outside 0–1 give an error instead of being clipped silently; hue wraps as in CSS (400° = 40°). A 3-, 6- or 8-letter word made only of 0–9 and a–f (bad, add) is read as hex without #, with a note above the results.
「颜色反转(反色计算器)」免费吗?需要注册吗?Is the Invert Colors free? Do I need an account?
「颜色反转(反色计算器)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Invert Colors is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.