Tiny Online Tools logoTiny Online Toolssearch搜索工具…grid_view全部工具
首页chevron_right开发者工具chevron_rightRGB 转 HEXRGB 转 HEX

RGB 转 HEX

使用取色器将 RGB 颜色值转换为 HEX、HSL 和 CSS 颜色格式。

取色器
RGB 值Alpha 通道输出值
HSL 分解

相似工具

HEX 转 RGB

HEX 转 RGB

将 HEX 颜色代码转换为 RGB、HSL、HSV,并提供实时颜色预览。

提取十六进制调色板

提取十六进制调色板

从任意图片中提取主色调色板,并输出 Hex、RGB 和 HSL 数值。

JSON 验证器

JSON 验证器

验证 JSON syntax quickly.

HEX 查看器

HEX 查看器

View any file as a HEX dump 使用 offset, HEX bytes, 和 ASCII columns.

为 PDF 添加水印

为 PDF 添加水印

为 PDF 添加文字水印。

ASCII 转图片

ASCII 转图片

将 ASCII 艺术文本渲染为可下载的 PNG 或 JPG 图片。

GIF转MP4

GIF转MP4

直接在浏览器中将动态GIF文件转换为WebM/MP4视频格式。

apps

更多工具

浏览我们完整的免费在线工具集合。

转换 Between Color 格式化s Instantly

Color 格式化s vary depending on context. Design tools output RGB or HSL values, but CSS needs hex codes. Accessibility tools report RGB, but inline styles might use CSS rgb() notation. Manually 转换ing between 格式化s is error-prone and slow: look up conversion formulas, do math, verify the result, then type it into code.

This Color 转换er handles all major 格式化s. Use the visual color picker or enter RGB values directly, and instantly see the hex code, CSS rgb(), CSS hsl(), and HSL breakdown. Copy any 格式化 with one click.

Visual Color Picker or Manual Entry

Color Picker: Click the visual picker and select your color. As you adjust the hue, saturation, and brightness, all output 格式化s update in real time. This is fastest when you're working visually or need to find the right color.

RGB Sliders: Drag individual R, G, and B sliders (0-255 range) to fine-tune values. This is more precise when you have specific RGB values from a design tool or specification.

Copy Any Output 格式化: The 转换er 生成s:

  • HEX: #4246B0
  • HEX with Alpha: #4246B07F (with transparency)
  • CSS RGB: rgb(66, 70, 176)
  • CSS RGBA: rgba(66, 70, 176, 0.5) (with transparency)
  • CSS HSL: hsl(239, 40%, 48%)
  • CSS HSLA: hsla(239, 40%, 48%, 0.5) (with transparency)

Each 格式化 has its own copy button, so you can quickly paste the exact 格式化 your code needs.

HSL Breakdown for Understanding Color

Beyond conversion, the tool shows HSL (Hue, Saturation, Lightness) components:

Hue: The actual color (0-360 degrees on the color wheel)

Saturation: How vibrant the color is (0% = gray, 100% = pure color)

Lightness: How bright the color is (0% = black, 100% = white)

This breakdown helps you understand color relationships and makes it easier to adjust colors systematically in CSS or design tools.

Alpha Channel Support

Toggle alpha channel support to work with transparency. When enabled, you get:

  • An alpha slider (0-255)
  • RGBA and HSLA 格式化s
  • Hex with alpha (#RRGGBBAA) 格式化

Use this when you need semi-transparent colors for overlays, shadows, or layered UI effects.

Common Web Development Workflows

Design to Code: Copy a color from your design tool (often RGB or hex), paste the RGB values here, copy the exact CSS 格式化 you need, and paste into your stylesheet.

Accessibility Testing: 转换 colors between 格式化s to test contrast ratios and verify accessibility. Many a11y tools report RGB; quickly 转换 to hex for reference.

Theming & Color Manipulation: Understand the HSL breakdown to systematically 创建 lighter/darker variants of a color by adjusting lightness.

CSS Variables & Design Systems: 转换 colors to your team's preferred 格式化 (hex vs. rgb) for consistency in design system tokens.

Cross-Platform Development: Different platforms prefer different 格式化s. 转换 once, get all 格式化s, paste what you need.

Real-Time Visual Feedback

As you adjust values, see the resulting color displayed prominently. This visual feedback helps you verify the conversion is correct before copying.

Completely Local Conversion

Color conversion happens in your 浏览器. No server needed, no external processing, instant results.