Color Picker
Colour is one of the most powerful tools in a designer's or developer's arsenal, but working with colour values across different formats is surprisingly tedious. A designer picks a shade in Figma and notes the HSL value. A developer needs that same colour in HEX for a CSS variable and RGBA for a transparent overlay. The back-and-forth between format converters, browser DevTools colour pickers, and design tools wastes minutes that add up across every project.
The ToolzPedia Color Picker eliminates that friction. It is a real-time, browser-native colour picker that shows HEX, RGB, RGBA, HSL, and HSLa values simultaneously, all updating live as you drag the picker cursor across the saturation/brightness canvas, move the hue slider, or adjust the alpha channel. Every format has a one-click copy button. You can save frequently used colours to a persistent in-page palette for the duration of your session.
The tool is built entirely on the Canvas API and standard JavaScript with no external dependencies. Every computation stays in your browser. It works offline after the initial page load and requires no account, no signup, and no clipboard permissions beyond what your browser already provides.
Use the tool edit
How to use Color Picker edit
Follow these steps to use the tool:
-
Pick a color
Click or drag on the color canvas to select a hue and saturation.
-
Adjust hue & alpha
Use the hue slider to change color, and the alpha slider for transparency.
-
Copy any format
Click Copy next to HEX, RGB, HSL, RGBA or HSLa to grab the value for your CSS.
-
Save to palette
Hit + Save to collect your favourite colors for the current session.
Frequently asked questions edit
Use cases edit
Translate design mockup colours into CSS variables instantly. Pick the hue visually, grab the HEX for the variable definition, and copy the RGBA version for semi-transparent overlays, without switching tools.
Paste a known HEX value directly into the hex input field to load that exact colour, then copy it in any format your project requires: HSL for CSS custom properties, RGB for image editing software import fields, or RGBA for alpha-channel overlays.
Pick your background colour and foreground colour in sequence to note their HEX values, then paste them into a contrast checker. The picker makes capturing exact values from any colour you have in mind fast and accurate.
When passing colours to a developer, copy the HEX for web, the RGB tuple for After Effects, and the HSL for designers who prefer that representation, all from a single colour selection.
Drag the cursor around the saturation/brightness canvas to understand how saturation and value (brightness) interact. Move the hue slider to see the colour family change while saturation and brightness stay constant. The live HSL output makes colour space relationships intuitive.
How it works edit
The colour picker renders two canvas elements: the main saturation/brightness canvas and the hue strip. The main canvas is filled with a linear gradient from white to the current hue colour horizontally, and from fully opaque to black vertically, creating the classic HSV picker gradient. The hue strip is filled with a full-spectrum hue gradient from 0 to 360 degrees.
When you click or drag on either canvas, the tool reads the pixel coordinates, converts them to HSV (hue, saturation, value) parameters, and then converts HSV to RGB using the standard mathematical transformation. From RGB, the tool derives HEX (by converting each channel to a two-digit hexadecimal string), HSL (via the RGB-to-HSL formula), and RGBA/HSLa by incorporating the alpha channel value from the alpha slider.
All conversions happen in real-time on every mouse move event, so the output fields update instantly as you drag. The Canvas API's getImageData() method could be used for colour sampling, but the coordinate-to-HSV approach is more precise and avoids sub-pixel sampling artefacts.
Tips and best practices edit
- Type a HEX value directly into the HEX input field to jump to that exact colour. This is the fastest way to load a specific brand colour or a value you already have documented.
- The alpha slider controls the A channel in RGBA and HSLa. Dragging it to the left adds transparency. At full left (alpha = 0), the colour is completely transparent. At full right (alpha = 1), it is fully opaque.
- The saved palette at the bottom of the picker is session-persistent. If you need colours to survive page reloads, copy them to a note or your project's CSS file before closing the tab.
- For accessibility checks, you need the HEX values of both your background and foreground colours. Pick each one, copy the HEX, and paste into WCAG contrast tools like WebAIM Contrast Checker to verify your colour combinations meet AA or AAA standards.
- Pressing the + Save button adds the current colour to the palette row. Clicking any palette swatch loads that colour back into the picker, making it easy to cycle between the colours in your palette without re-entering values.
Common mistakes edit
The picker internally uses HSV (Hue, Saturation, Value) for the canvas representation, but outputs HSL (Hue, Saturation, Lightness) because HSL is what CSS uses. These are different colour models. The same HEX colour has different S and L/V numbers in HSL versus HSV. Always use the HSL output for CSS, not a manual conversion from the canvas coordinates.
Some contexts, such as HTML background-color in older email clients or certain SVG fill attributes, do not render alpha correctly. Use HEX or RGB (without alpha) for maximum compatibility.
PANTONE and other proprietary colour systems define colours for physical printing processes. The HEX equivalent of a PANTONE colour is only an approximation for screen display. For print work, always work from official PANTONE-to-CMYK conversion tables.
Related tools edit
Other free design tools available on ToolzPedia:
See also edit
- All design tools on ToolzPedia
- All tools, every utility in the encyclopedia
- Tutorials and guides related to design tools
- Report a bug or request a feature