RGBから16進数への変換ツール
Adjust the sliders or paste a HEX code below to convert between RGB, HEX and HSL instantly, with a live color preview — all calculated on your device.
Color input
Converted output
レビュー
How to convert RGB to HEX
- Drag the Red, Green and Blue sliders — or paste a HEX code straight into the field — to set a color.
- Watch the preview swatch and the HEX, RGB and HSL values update live as you adjust anything.
- Click any value card to copy it, ready to paste into CSS, design software, or code.
RGB, HEX and HSL: what's the difference?
RGB, HEX and HSL all describe the exact same colors — they're just different ways of writing the same numbers. RGB defines a color by how much red, green and blue light combine to make it, each on a 0–255 scale. HEX is the same RGB values rewritten as a compact 6-digit base-16 code, which is why rgb(31, 58, 95) and #1f3a5f are identical colors. HSL instead describes a color by hue (its position on a color wheel), saturation (how vivid it is) and lightness — a format that's often more intuitive for picking related shades.
Where each format is typically used
| 書式 | Typical use | Why |
|---|---|---|
| HEX | CSS, HTML, design tools | Short, easy to paste and share as a single string |
| RGB | CSS with transparency (rgba) | Supports an alpha channel for opacity |
| HSL | Building color palettes | Easy to create lighter/darker or related hues by changing one number |
Using these values in CSS
Any of the three formats work directly in a stylesheet: color: #1f3a5f;, color: rgb(31, 58, 95); and color: hsl(210, 51%, 25%); all render the identical navy blue. HEX is the most common shorthand for solid colors, while RGB (or its rgba() variant) is useful when a color needs partial transparency, and HSL makes it straightforward to generate a consistent set of shades by keeping the hue fixed and only adjusting lightness.
よくある質問
Is this RGB to HEX converter free to use?+
はい。ブラウザ上でJavaScriptのみで動作するため、アカウントもAPIキーも不要で、利用回数に制限もありません。
Does my color data get uploaded anywhere?+
No. Every conversion happens locally in your browser. Nothing is sent to a server, stored, or logged.
What's the actual difference between HEX and RGB?+
They describe the same color in different notations — HEX is a 6-digit base-16 shorthand for the same red, green and blue values RGB writes out as three separate numbers from 0 to 255.
設計・開発用ツール
このコンバーターの仕組み
Values are converted live between RGB, HEX and HSL with JavaScript as you type or pick a color — nothing you enter is uploaded to a server or stored anywhere.
最終更新日:2026年8月28日。
ツールボックスには他にもツールがあります
ホームページには、他にもAPIキー不要の無料ツールが掲載されています。