HEX 转 RGB — Uttir
Skip to main content

HEX 转 RGB

将任意 HEX 颜色代码转换为对应的 RGB 和 HSL 值。

HEX 转 RGB — HEX codes like #4f46e5 are shorthand for RGB values. This converter expands any 3- or 6-digit HEX code into its rgb() and hsl() CSS equivalents, with a live preview swatch.

Conversion runs locally in your browser.

Was HEX 转 RGB useful?

HEX 转 RGB是什么?

HEX codes like #4f46e5 are shorthand for RGB values. This converter expands any 3- or 6-digit HEX code into its rgb() and hsl() CSS equivalents, with a live preview swatch.

Invalid input is flagged immediately so you never copy a broken value into your stylesheet.

使用方法

  1. Enter a HEX code

    With or without the leading #, 3 or 6 digits.

  2. Copy RGB or HSL

    Both formats appear with copy buttons.

示例

Shorthand expands

#f80 expands to the same color as #ff8800.

#f80

结果: rgb(255, 136, 0)

常见问题

相关指南

相关工具

Last reviewed: 2026-11-21