RankHush Tools
color tools

Color Picker and HEX, RGB, HSL Converter

Choose a color and convert between HEX, RGB and HSL online for free, with no sign up. Use the visual picker, enter a supported CSS color value, or generate a random color. Preview the result and copy the format you need for a stylesheet or design handoff.

Made for a smoother workflow

Tool features

Everything you need to get the job done, without the extra steps.

  • Pick colors visually
  • Get HEX color codes
  • Convert colors between HEX, RGB, and HSL
  • Preview selected colors
  • Copy color values instantly
  • Explore colors for UI and web design

Simple from start to finish

How to use this tool

4 steps
  1. 01Choose a color using the color picker.
  2. 02View its HEX, RGB, and HSL values.
  3. 03Select the color format you need.
  4. 04Copy the color code into your project.

Practical guide to Color Picker & Converter

By RankHush Tools · Updated

A color picker and converter for CSS

A CSS color picker and converter helps you describe one color in different ways. HEX uses hexadecimal pairs for red, green and blue. RGB writes those channels as numbers from 0 to 255. HSL describes hue, saturation and lightness, which can be easier to discuss when adjusting a design.

For example, red can be written as #FF0000, rgb(255, 0, 0) or hsl(0, 100%, 50%). Changing the notation does not create a new color. The preview lets you confirm your input before copying a color picker value into code. Both color and the UK spelling colour refer to these same representations.

Convert a HEX color picker value to RGB

Select the input format, enter a value and use Convert. For HEX, #abc is accepted as shorthand for #AABBCC. RGB input uses comma-separated whole-number channels such as rgb(99, 102, 241). HSL input uses a hue plus percentage saturation and lightness, such as hsl(239, 84%, 67%).

The results panel displays the equivalent HEX, RGB and HSL strings. Copy the individual value that your project needs, or download the supported formats in a text file. If the input is not recognized, review the format and channel ranges rather than assuming the preview represents your latest entry.

Use colors consistently in a design

Keep an approved set of values for headings, body text, backgrounds and actions. When collaborating, share exact codes instead of descriptions such as light blue. A color picker example can help explain a choice, but testing the color inside a button or on a page gives better context than viewing one large swatch.

This tool converts opaque sRGB values. Its HSL values are rounded, so converting repeatedly between formats can introduce small differences. Start from your original HEX value when exact channel values matter. Check contrast with a dedicated checker before using a foreground and background pair for text.

Image, screen and advanced color formats

This online color picker does not currently sample a color from an image, a camera or another area of your screen. Use a known HEX, RGB or HSL value as input. It is a converter with a visual browser picker, rather than an image upload or screen-capture application.

LCH and OKLCH color picker formats, alpha transparency and a dedicated color wheel are not supported by this version. A browser may show different native color selection controls on different devices. The supported conversion formats remain HEX, RGB and HSL regardless of how that native control appears.

Start with the color you actually need to reproduce

Use the visual picker when exploring a color, or enter an existing supported value when matching a specification. A brand document might provide #336699, a stylesheet might contain rgb(51, 102, 153), and a design note might express the color in HSL. These are different descriptions of the same ordinary RGB color. Converting the notation lets you use the form required by your project without intentionally changing the chosen color.

The tool works with color values rather than extracting a pixel from an uploaded image. If you need to match a photo, obtain a representative color through an appropriate sampling workflow and enter the value here. A color visible in a screenshot may already have been changed by image compression, display settings or the background behind it, so retain the original design value when you have one.

Read a HEX value one pair at a time

A conventional six-digit HEX color contains three pairs: red, green and blue. Each pair runs from 00 to FF, which corresponds to a channel value from 0 to 255. In #336699, the three pairs become 51, 102 and 153. The # character identifies the value as a CSS hexadecimal color; it is not another channel. Letters A through F complete the hexadecimal digit set after 0 through 9.

The three-digit shorthand #369 expands to #336699 by repeating each digit. It does not expand by adding zeros. Entering shorthand can be convenient, while copying the normalized six-digit value helps avoid ambiguity during handoff. This picker uses opaque colors in its HEX, RGB and HSL workflow; alpha transparency and wider color spaces require a separate tool or the appropriate controls in your design application.

Understand RGB as three channel settings

RGB describes the intensity of red, green and blue channels in an additive screen color model. rgb(0, 0, 0) represents black and rgb(255, 255, 255) represents white in this notation. A value with one channel at its maximum and the others at zero produces a saturated primary color. The picker lets you see the result rather than relying only on the numbers.

When entering RGB here, use the supported comma-separated form, such as rgb(51, 102, 153), with channels in the allowed range. CSS has additional modern syntaxes, percentage forms and alpha forms that this particular parser does not implement. If a browser accepts a more advanced declaration but this tool rejects it, simplify it to the supported representation rather than assuming the color itself is impossible.

Use HSL for intentional visual adjustments

HSL describes hue as an angle and saturation and lightness as percentages. A hue near 0 degrees corresponds to red, while other angles move around the color wheel. Lower saturation moves toward gray, and lightness changes how light or dark the result appears. This representation can make an editing decision easier to describe than independently changing three RGB channels.

For the example #336699, the tool reports an HSL representation near hsl(210, 50%, 40%). Because the display rounds values, converting back and forth can introduce a small difference for some colors. HSL lightness is also not a direct measurement of perceived brightness or text contrast. Use it to explore a color, then test the actual foreground and background combination in the design.

Build a reusable CSS color token

Choose a value, copy the required notation and place it in a named custom property such as --brand-primary. Use that property in the parts of the interface that share the same visual role. Keeping a named token is easier to maintain than copying the literal color into many unrelated selectors. It also makes a later brand change more deliberate because the role has a name.

Choose names according to how the color is used. A token for a primary button, a muted border and a warning state can have different requirements even when they start from a related hue. The picker supplies values; it does not create a complete token architecture or decide which components should share them. Record those decisions in the design system alongside typography, spacing and interaction states.

Check text readability in context

A color swatch by itself does not show whether text will be readable on a chosen background. Contrast depends on the pair of colors, the text size and other conditions of use. This page does not calculate a contrast ratio or certify WCAG conformance. Use a dedicated contrast checker and inspect the actual interface before choosing a text and background combination for production.

Also inspect links, focused controls, disabled states and messages. A design can look attractive while making a keyboard focus indicator difficult to see. Avoid communicating a warning or success only through a hue change; provide text or another meaningful cue. A color that works for a large decorative block may require a different shade when used for small text on a white page.

Translate a screen palette into a practical handoff

Give a teammate the exact copied code, the notation and its intended use. Include the background against which the color was reviewed. A screenshot is useful for context, but it should not be the only specification because another person may sample a different pixel. For several related colors, use the Color Palette Generator to collect a set, then verify each role in the real design.

These values describe screen-oriented RGB colors. This tool does not convert them into a production CMYK ink recipe, a spot color reference or a calibrated print proof. A printed piece depends on its ink, paper and production workflow. Ask the printer for the appropriate specification instead of assuming that a familiar HEX code will reproduce identically on every physical material.

Diagnose an unexpected color or rejected value

Check for an omitted #, a missing channel, an out-of-range number or a pasted alpha value. Enter a known supported example before investigating a complex CSS declaration. HEX letter casing does not change the color, and an expanded shorthand can look different as text while describing the same RGB value. Copy the actual output rather than retyping it from memory.

If the value is correct but looks different elsewhere, compare backgrounds, transparency and display settings. Browser themes, color profiles, night modes and the surrounding design can affect perception. This picker cannot make every screen display a color identically. Keep the numeric specification as the common reference, verify the final component at its real size and use a managed color workflow when the project requires precise reproduction.

Helpful answers

Frequently asked questions

Is this color picker and converter free?

Yes. You can choose colors, convert the supported formats, copy values and download a text file for free without creating an account.

How do I convert a color picker value to RGB?

Choose HEX as the input format, enter a valid value and convert it. For example, #FF0000 becomes rgb(255, 0, 0). Copy the RGB result into software or CSS that expects red, green and blue channels.

Can I pick a color from an image or screen?

Not in this version. The page accepts HEX, RGB and HSL values and provides a visual color input. It does not include image sampling, camera sampling or a screen eyedropper.

Does the converter support OKLCH or LCH?

No. The current formats are HEX, RGB and HSL for opaque sRGB colors. It does not convert LCH, OKLCH, CMYK or alpha-channel values.

Why can the same color look different on two devices?

Displays differ in calibration, brightness and color handling, and surrounding colors affect perception. A matching HEX code describes the same intended color value but cannot guarantee that every physical screen or printed sample looks identical.

Can I use the copied values in CSS?

Yes. The output uses familiar HEX, rgb() and hsl() forms. For example, use a copied HEX value in color: #4937EF; or background-color: #4937EF;. Check the foreground and background contrast in the final design.

Keep exploring

Related tools

A few more handy tools that may fit your workflow.

Color Tools

Color Palette Generator

Generate and customize color palettes, lock favorites, and export CSS or JSON.

Open Tool

Found this useful?

Share this tool with someone who might find it handy.