LocalExcelTool
はじめる

色変換 (HEX / RGB / HSL)

色をHEX・RGB・HSLに一括変換。デザイン作業の高速化に。

色変換 (HEX / RGB / HSL)とは

色変換とは、色の表現をHEX(#RRGGBB)・RGB(赤緑青)・HSL(色相彩度明度)の間で相互に変換する処理です。

🔒 処理はすべてブラウザ内で完結し、データは送信されません。

このツールの前提

処理場所
このページのブラウザ内(JavaScript / Canvas)
アップロード
なし — ファイルは端末の外に出ません
オフライン
ページを開いた後は通信不要

Hex, RGB and HSL describe the same thing three ways

Hex and RGB are the same numbers in different notation: #3B82F6 is rgb(59, 130, 246). HSL re-expresses that triple as hue, saturation and lightness, which is far easier to reason about when building a palette — but it is a transform of the same sRGB values, not a different colour space.

The conversion is exact in the RGB-to-HSL direction and back, with rounding at the last step. Small drift (one unit in a channel) appears when round-tripping through HSL because the intermediate values are not integers; keep the source hex if exactness matters.

Why an HSL scale is not perceptually even

Equal steps in HSL lightness do not look like equal steps to the eye. Yellow at L=50% looks much brighter than blue at L=50%, because HSL is defined on the sRGB cube rather than on human perception. Building a 10-step palette by interpolating L therefore produces a scale with obvious jumps in the middle.

Perceptually uniform spaces — OKLCH, CIELAB — exist precisely to fix this, and are now supported in CSS via oklch(). For anything where the steps will be seen side by side, generating in OKLCH and converting to sRGB for output gives visibly smoother ramps.

The gamma question

sRGB values are gamma-encoded: the stored number is not the light intensity. Averaging two colours by taking the mean of their RGB values therefore produces a result that is darker than the visual midpoint, because the average happens in encoded space rather than in linear light.

The correct order for blending is decode to linear, mix, re-encode. Skipping the decode is why gradient blends between two saturated colours often show a muddy band in the middle, and why the same gradient looks different in a design tool that works in linear space.

使い方

  1. 1.色を入力
  2. 2.「実行する」をクリック
  3. 3.必要な形式をコピー

他の方法との比較

同じ変換をする方法は 3 つあります。ブラウザ内(このページ)、サーバー側の変換サービス、デスクトップアプリ。差がつくのは速度ではなく、ファイルがどこへ行くかと、無料でどこまでできるかです。

観点このツールサーバー側の変換サービス
ファイルの処理場所このページのブラウザ内ベンダーのサーバー(アップロード後)
アカウント不要多くの場合必要(無料枠の制限解除に登録を求める)
無料で扱えるサイズサイズ制限なし(回数制限もなし)数ファイル/時間、または 5〜10MB 程度で課金 wall
料金無料。Pro は月 $9(大きいファイルと AI 機能のみ)サブスクが一般的。おおむね月 $7〜15(2026 年 11 月時点)
オフライン一度開けば通信不要不可
20MB を処理し始めるまで待ち時間なし(アップロードが無い)アップロードが支配的(10Mbps 上りで約 16 秒)
保証できないこと値は端末の CSPRNG で生成され、サーバーには送られません同じ(変換の原理は変わらない)

サーバー側のサービスが優れている点は明確にあります。巨大なファイル、チームでの共有、変換履歴の管理、スクリプトからの自動化。逆に「1 回だけ、手元のファイルを別形式にしたい」という今回の用途では、アップロードの待ち時間と登録の手間だけが増えます。

よくある質問

どの形式で入力できますか?

#RRGGBB、#RGB、rgb(r, g, b)、または「r, g, b」形式に対応します。

データは送信されますか?

いいえ、ブラウザ内で計算します。

その他のジェネレーター