Image Converters 도구 업데이트됨 1일 전

Hex and RGB Color Picker & Converter

Pick a colour or type a hex code and instantly see it as HEX, RGB and HSL, with sliders for every channel and one-click copy buttons for CSS-ready values. The tool also shows contrast ratios against white and black with a WCAG rating, and generates complementary, analogous, triadic and split complementary harmonies. Everything runs in your browser.

Color Picker HEX Color RGB Converter Copy Color

사용법 Hex and RGB Color Picker & Converter

색상 선택기 및 변환기

HEX, RGB 간 변환 및 색상 선택이 간편합니다

색상 선택하기
—
—
WCAG AA
최근 색상
아직 저장된 색상이 없습니다
16진수 색상
#
RGB 색상
rgb( )

R
G
B
HSL 색상
hsl( )
H
S
L
색채의 조화
상호 보완적인
유사한
삼원적
분할 보색
도구 링크
클립보드에 복사되었습니다.
이 도구를 개선하는 데 도움을 주세요
141
소요 시간
139
총 사용자 수
5+ 년
제공됨
최종 검토일: 1일 전. 사용량 수치는 정기적인 감사 과정에서 갱신됩니다. (보고 시작일: 21 Feb 2022)
불일치 신고하기

내용 읽기

이 도구의 작동 방식과 사용 시기를 알아보세요.

One Colour, Three Notations, Instantly in Sync

The Hex and RGB Color Picker and Converter keeps a single colour in view and shows it at the same time as a HEX code, an RGB triplet and an HSL value. Change it in any one place, whether by typing a hex code, dragging an RGB slider, nudging hue or lightness, or choosing a colour from your system's picker, and every other field, the large preview swatch, the contrast scores and the colour harmony swatches update at once. It is built for web designers, front-end developers, students learning CSS colour, and anyone who has a colour in one format and needs it in another.

Everything runs in your browser with plain JavaScript. No colour values are sent to a server, and the page works as soon as it has loaded.

What Is on the Page

Preview and picker

The left column holds a large preview of the current colour and a Pick a Color button. That button opens your browser's or operating system's native colour chooser, so its look depends on whether you are on Windows, macOS, Android or iOS. Whatever you choose there becomes the current colour.

Contrast and accessibility

Below the preview are two contrast badges. One shows the contrast ratio of the current colour against pure white, the other against pure black, each to two decimal places. A third badge gives a WCAG rating based on the better of those two ratios.

HEX Color card

A text field for the six-digit hex code, with two copy buttons: Copy HEX copies the code without a hash (for example 4263EB) and Copy with # copies it ready for CSS (#4263EB).

RGB Color card

Shows the colour as rgb( 66, 99, 235 ) with three sliders labelled R, G and B, each paired with a number box that accepts 0 to 255. Copy RGB copies the bare numbers (66, 99, 235) and Copy rgb() function copies rgb(66, 99, 235).

HSL Color card

Shows the same colour as hue, saturation and lightness, with H (0 to 360), S (0 to 100) and L (0 to 100) sliders and number boxes. Copy hsl() function copies a string like hsl(228, 81%, 59%).

Color Harmonies

Four rows of swatches generated from the current colour's hue: Complementary, Analogous, Triadic and Split Complementary. Hovering a swatch shows its hex code, and clicking it makes that swatch the current colour.

Theme toggle

A moon or sun button in the corner switches the page between light and dark appearance, which is useful for judging how a colour looks on each background.

How to Convert HEX to RGB

  1. Click into the HEX Color field and clear it.
  2. Type the six hex digits without the hash, for example FF8800. The field holds six characters, so pasting a value with a leading # cuts off the last digit; paste or type the code without it.
  3. As soon as six valid digits are present, the RGB card shows the matching values, here 255, 136, 0, and the preview updates.
  4. Click Copy rgb() function to copy rgb(255, 136, 0).

Three-digit shorthand also works. Type F80 and click or tab out of the field; on leaving the field it is expanded to FF8800. If what you typed is neither three nor six valid hex digits when you leave the field, it reverts to the current colour's code.

How to Convert RGB to HEX

  1. Drag the R, G and B sliders, or type values from 0 to 255 into the number boxes beside them.
  2. The HEX field updates live in upper case.
  3. Click Copy with # to copy the CSS-ready code.

Note that the rgb( ... ) text line at the top of the RGB card is a display of the current value; to change the colour, use the sliders or the number boxes.

Working with HSL

HSL is often easier for adjusting a colour than RGB. To make a button colour lighter for a hover state, keep H and S and raise L by 8 to 10. To make a muted version for a background, lower S. Each change in the HSL card instantly recalculates the HEX and RGB values. Because the HSL fields hold whole numbers, converting a colour to HSL and back can occasionally shift an RGB channel by one step; for an exact colour, copy the HEX or RGB value.

The Maths in Brief

A hex code is three pairs of base-16 digits, one each for red, green and blue. Each pair runs from 00 (0) to FF (255). Taking the tool's starting colour #4263EB as an example:

ChannelHex pairCalculationDecimal
Red424 x 16 + 266
Green636 x 16 + 399
BlueEB14 x 16 + 11235

So #4263EB equals rgb(66, 99, 235), which the tool shows as hsl(228, 81%, 59%). Going the other way, each decimal value is divided by 16: the whole part is the first hex digit and the remainder is the second.

Understanding the Contrast Badges

The contrast ratio uses the WCAG relative luminance formula and ranges from 1 (no contrast) to 21 (black on white). The rating badge applies these thresholds to the higher of the two ratios:

BadgeRatioMeaning
WCAG AAA7 or moreMeets the enhanced level for normal text
WCAG AA4.5 or moreMeets the minimum for normal body text
WCAG AA Large3 or moreAcceptable for large or bold text only
WCAG Failbelow 3Too low against both white and black

Because the rating uses whichever of white or black scores better, read the individual badges to see which pairing actually passes. The tool only measures against pure white and pure black; to check two custom colours against each other, you need a dedicated contrast checker.

Common Named Colours

These standard CSS colour keywords are handy reference points. Type any of the hex codes into the tool to see them, their contrast scores and their harmonies.

Color NameHex ColorRGB ColorHSL
Black#000000rgb(0,0,0)hsl(0, 0%, 0%)
White#FFFFFFrgb(255,255,255)hsl(0, 0%, 100%)
Red#FF0000rgb(255,0,0)hsl(0, 100%, 50%)
Lime#00FF00rgb(0,255,0)hsl(120, 100%, 50%)
Blue#0000FFrgb(0,0,255)hsl(240, 100%, 50%)
Yellow#FFFF00rgb(255,255,0)hsl(60, 100%, 50%)
Cyan / Aqua#00FFFFrgb(0,255,255)hsl(180, 100%, 50%)
Magenta / Fuchsia#FF00FFrgb(255,0,255)hsl(300, 100%, 50%)
Silver#C0C0C0rgb(192,192,192)hsl(0, 0%, 75%)
Gray#808080rgb(128,128,128)hsl(0, 0%, 50%)
Maroon#800000rgb(128,0,0)hsl(0, 100%, 25%)
Olive#808000rgb(128,128,0)hsl(60, 100%, 25%)
Green#008000rgb(0,128,0)hsl(120, 100%, 25%)
Purple#800080rgb(128,0,128)hsl(300, 100%, 25%)
Teal#008080rgb(0,128,128)hsl(180, 100%, 25%)
Navy#000080rgb(0,0,128)hsl(240, 100%, 25%)

Building a Palette with Harmonies

The harmony rows rotate the hue of the current colour while keeping its saturation and lightness:

  • Complementary: the current colour and the hue opposite it (plus 180 degrees). Strong contrast for call-to-action accents.
  • Analogous: hues 30 degrees either side of the current colour. Calm, cohesive schemes.
  • Triadic: three hues spaced 120 degrees apart. Lively but balanced.
  • Split Complementary: the current colour plus the two hues 150 and 210 degrees away. Contrast with less tension than a straight complement.

Click any swatch to adopt it, read its codes, and copy what you need. Clicking through harmonies is a quick way to explore a scheme around a brand colour.

Tips

  • Use Copy with # for CSS, SCSS and Tailwind arbitrary values; use Copy HEX for design tools that want the digits only.
  • Check both contrast badges before choosing a text colour for a coloured background.
  • Switch the page theme to preview a colour on light and dark surfaces.
  • Adjust lightness in the HSL card to create consistent tints and shades of one hue.

Things to Avoid

  • Pasting #RRGGBB into the HEX field: the seven characters are trimmed to six, so the value is cut off. Paste just the digits.
  • Typing into the rgb( ) or hsl( ) text lines and expecting the colour to change; use the sliders or number boxes.
  • Treating the WCAG badge as a full accessibility audit; it measures contrast against black and white only.

Limitations

  • No alpha channel: RGBA, HSLA and eight-digit hex codes are not supported.
  • Only HEX, RGB and HSL are shown; there is no CMYK, HSV or Pantone conversion.
  • HSL values are whole numbers, so round trips through HSL can be off by one in an RGB channel.
  • Contrast is measured against white and black only.
  • The native picker's appearance and features depend on your browser and operating system.

Frequently Asked Questions

자주 묻는 질문

사용자가 결과를 신뢰하기 전에 자주 묻는 질문에 대한 간결한 답변.

Type the six hex digits, without the hash, into the HEX Color field. The RGB card updates immediately and Copy rgb() function copies the result in CSS form.

Yes. Type the three digits and leave the field; the code is expanded to six digits, for example FF8800, and the other values update.

The HEX field holds six characters. If you paste a code with a leading #, the last digit is cut off. Paste only the six digits.

It takes the higher of the colour's contrast ratios against white and against black, then labels it AAA at 7 or more, AA at 4.5 or more, AA Large at 3 or more, or Fail below 3.

No. The tool works with opaque colours only and does not handle alpha values or eight-digit hex codes.

HSL values are rounded to whole numbers, so converting through HSL can change an RGB channel by one. Copy the HEX or RGB value when you need an exact match.

No. All conversions, contrast calculations and harmonies are computed by JavaScript in your browser.

댓글 (0)

사용자 토론, 예외적인 사례 및 추가 팁을 위한 공간입니다.
댓글 남기기
댓글을 제출하면 공개적으로 표시됩니다.
아직 댓글이 없습니다. 가장 먼저 댓글을 남겨보세요!
저희에게 알려주세요!
이 도구와 관련된 문제를 신고하기

발생한 문제를 자세히 설명해 주시면, 저희가 이를 조사하고 도구를 개선할 수 있습니다.

가장 도움이 되는 것은 무엇인가
입력 내용, 예상 결과, 실제 결과, 브라우저/기기 정보를 기재해 주시고, 도움이 될 경우 스크린샷도 첨부해 주세요.
스크린샷 버튼은 브라우저에 표시된 페이지를 캡처하여 생성된 이미지를 이 양식에 첨부합니다.
전체 화면 스크린샷
newisty를 통해 브라우저에서 캡처되었습니다.
아직 스크린샷을 찍지 않았습니다.
도구 보고서