🎨 HEX 转 RGBHEX to RGB Converter
把 HEX 颜色代码转换为 RGB:支持 3/4/6/8 位(含透明度)写法,也可粘贴 rgb()/hsl() 值统一转换格式,每行一个批量转换,可输出 CSS rgb()/rgba()、纯数字、百分比或 0–1 浮点。Convert HEX color codes to RGB: 3, 4, 6 or 8-digit forms (with alpha), plus pasted rgb()/hsl() values, one per line in bulk, output as CSS rgb()/rgba(), plain numbers, percentages or 0–1 floats.
使用说明与常见问题How-to & FAQ
「HEX 转 RGB」是什么?What is the HEX to RGB Converter tool?
把 HEX 颜色代码转换为 RGB:支持 3/4/6/8 位(含透明度)写法,也可粘贴 rgb()/hsl() 值统一转换格式,每行一个批量转换,可输出 CSS rgb()/rgba()、纯数字、百分比或 0–1 浮点。Convert HEX color codes to RGB: 3, 4, 6 or 8-digit forms (with alpha), plus pasted rgb()/hsl() values, one per line in bulk, output as CSS rgb()/rgba(), plain numbers, percentages or 0–1 floats.
如何使用「HEX 转 RGB」?How do I use the HEX to RGB Converter tool?
在「HEX 转 RGB」中,把内容粘贴或输入到上方输入框,按需设置「输出格式」,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「#FF5733」,得到「rgb(255, 87, 51)」。In the HEX to RGB Converter: Paste or type into the input box, adjust "Output"; the result appears below instantly — click "Copy result" to copy it. Example: "#FF5733" → "rgb(255, 87, 51)".
HEX 怎么换算成 RGB?How does HEX map to RGB?
6 位 HEX 每两位是一个十六进制数,依次为红、绿、蓝(00–FF = 0–255)。例如 #FF5733:FF = 255,57 = 87,33 = 51。3 位写法 #F53 等于 #FF5533。Each pair of hex digits is one channel — red, green, blue — from 00–FF (0–255). #FF5733 → FF = 255, 57 = 87, 33 = 51. Shorthand #F53 means #FF5533.
8 位 HEX 是什么?What is an 8-digit HEX?
最后两位是透明度(alpha),00 完全透明、FF 不透明;例如 #00000080 约为 50% 透明的黑色,对应 rgba(0, 0, 0, 0.502)。The last two digits are alpha: 00 is fully transparent and FF opaque, so #00000080 is about 50% transparent black, rgba(0, 0, 0, 0.502).
结果可以直接用在 CSS 里吗?Can I paste the results into CSS?
可以。「HEX 转 RGB」输出的是标准 CSS 颜色写法,可直接复制使用;可接受的输入格式以输入框旁的说明为准。Yes. The HEX to RGB Converter outputs standard CSS color notation you can copy straight into a stylesheet; accepted input formats are listed next to the input.
「HEX 转 RGB」免费吗?需要注册吗?Is the HEX to RGB Converter free? Do I need an account?
「HEX 转 RGB」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The HEX to RGB Converter is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.