カラーコード変換
HEX、RGB、HSLの色コードを相互に変換して同期します。
Edit any field to sync all color formats.
What is Color Code Converter?
Color Code Converter instantly converts and synchronizes color values between HEX, RGB, and HSL formats. Change one format and the others update automatically, making it easy to work across design tools, CSS, and code.
Color format overview
- HEX (
#RRGGBB): 6 hex digits representing red, green, and blue channels. Standard in HTML/CSS. - RGB (
rgb(R, G, B)): Each channel is a number from 0 to 255. Used in CSS and image editors. - HSL (
hsl(H, S%, L%)): Hue (0 E60°), Saturation (0 E00%), Lightness (0 E00%). More intuitive for color design.
Notes
- HEX values are case-insensitive.
#ff5733and#FF5733are identical. - Shorthand HEX like
#f0fis automatically expanded to#ff00ff. - Alpha (transparency) is not supported by this tool. Use
rgba()orhsla()for transparency.
FAQ
- Which format should I use in CSS?
- All three are valid in CSS. HEX is most common for static colors. HSL is popular in design systems because it is easier to create consistent palettes by adjusting lightness or saturation.
- How do I convert a Figma color to CSS?
- Figma typically shows colors as HEX or RGB. Copy the HEX value from Figma's color picker and paste it here to get the RGB or HSL equivalent for use in CSS.
- What is the hue value in HSL?
- Hue is the color's position on a 360-degree color wheel. 0° and 360° are red, 120° is green, 240° is blue. Values between these create intermediate colors.
概要
HEX/RGB/HSL を相互変換し、値を同期表示します。CSS実装やデザイン受け渡し時の色確認に便利です。
使い方
- HEX/RGB/HSLいずれかの形式で色を入力します。
- 他形式への変換結果を確認します。
- 必要形式をコピーして利用します。
使用例
-
HEX→RGB
入力: #3366ff
出力: rgb(51, 102, 255)
-
RGB→HSL
入力: rgb(255, 0, 0)
出力: hsl(0, 100%, 50%)
補足
- 各形式の入力構文が正しい必要があります。
- 表示色はモニタープロファイル差の影響を受けます。
- 丸めにより値がわずかに変化することがあります。
よくある質問
- 値が少しずれるのはなぜ?
- 丸め処理や表示環境差が原因です。
- 短縮HEXは使えますか?
- 有効構文なら利用可能で、内部で展開される場合があります。
- アルファ値は扱えますか?
- 現UIの対応範囲を確認してください(基本はHEX/RGB/HSL)。
Embed this tool
Paste this iframe into any HTML page to embed カラーコード変換 on your site: