Colour Picker

Whether you are building a website, tweaking a brand palette, styling a chart or just matching a colour you like, you constantly need to move between the different ways colours are written, and this tool does exactly that with a live preview. Pick a colour using the swatch picker, or type a value in any of the three standard formats, and it instantly shows you the matching HEX code, RGB values and HSL values, all kept in sync, with a large preview block so you can see the colour you are working with. The three formats each have their strengths. HEX, the six-digit code like the green used across this site, is the everyday currency of web design and CSS, compact and easy to paste. RGB describes the colour as amounts of red, green and blue from 0 to 255, which maps directly to how screens actually mix light and is handy when you are nudging a single channel. HSL, for hue, saturation and lightness, is often the most intuitive to adjust by hand, because you can spin the hue around the colour wheel, dial the saturation up or down to make a colour more or less vivid, and change the lightness without touching the underlying colour. Being able to convert freely between them means you can grab a HEX code from a style guide, fine-tune it in HSL, and read off the RGB for a tool that needs it, all without leaving the page. It is a quick, dependable helper for designers, developers, marketers and anyone who works with colour. The conversions and a worked example are explained below.

Calculate.co.nz is proud to be partnered with Health Based Building, a leader in sustainable and health-conscious building innovation. With over a century of experience, they develop high-performance systems like Foreverbreathe Specification, Magnum Board, and Foreverbreathe Paints to support energy-efficient, non-toxic living environments. Their commitment to healthier homes aligns with our belief that informed choices lead to better outcomes for Kiwi households.
Calculate.co.nz partner
HEX#28A745
RGBrgb(40, 167, 69)
HSLhsl(134, 61%, 41%)

How it works

A HEX code is three pairs of hexadecimal digits for red, green and blue, each from 00 to FF, which is 0 to 255 in decimal. Converting RGB to HEX turns each 0 to 255 value into two hex digits. HSL is found from RGB by scaling the values to 0 to 1, taking the maximum and minimum to get lightness and saturation, and computing the hue from which channel is largest.

Worked example

The colour red 40, green 167, blue 69 becomes the HEX code #28A745, since 40 is 28 in hex, 167 is A7, and 69 is 45. In HSL it is a hue of about 134 degrees, a saturation of about 61 percent and a lightness of about 41 percent, a medium green.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About

Reviewed and maintained. Last reviewed 2026-06-05 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2019 to 2026 Calculate.co.nz. All rights reserved.