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 查看器

HEX 查看器

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

HEX to Tailwind Converter

HEX to Tailwind Converter

Convert a HEX color into Tailwind-friendly classes and a reference scale.

Color Palette Generator

Color Palette Generator

Generate harmonious color palettes from a single base color.

拆分 PDF

拆分 PDF

将 PDF 文件拆分为单独页面或页面范围。

按文件大小拆分 PDF

按文件大小拆分 PDF

将 PDF 拆分为多个较小的部分,每一部分保持在您设置的最大文件大小(MB)以下。适合邮件附件和上传限制。

PDF 转 SVG

PDF 转 SVG

在浏览器中将 PDF 页面转换为可缩放的 SVG 矢量文件。

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.