Color Code Generator

Pick or input any colour — get HEX, RGB, HSL, HSV, CMYK, and 4 more formats instantly.

9 FORMATS HARMONIES GRADIENT BUILDER IMAGE PICKER
#783F8E
Purple
Pick a Color
R 120
G 63
B 142
Color Codes
HEX #783F8E
RGB rgb(120, 63, 142)
RGBA rgba(120, 63, 142, 1)
HSL hsl(279, 38%, 40%)
HSV hsv(279, 56%, 56%)
CMYK cmyk(15%, 56%, 0%, 44%)
CSS color: #783F8E;
Tailwind text-[#783F8E]
Android #FF783F8E
Recent Colors

Colors you pick will appear here.

Color Harmonies
Click a swatch to apply
Shades & Tints
Tints (lighter)
Shades (darker)
Gradient Generator
135°
CSS linear-gradient(135deg, #783F8E, #4F1271)
Pick from Image

Click or drop an image here

PNG, JPG, GIF, WEBP — nothing is uploaded

Click on the image to pick a colour

Sample Preview

Your Color in Action

This paragraph shows how your chosen colour looks as a headline, body text and accent. Use it to check contrast and legibility before you commit.

Contrast vs white: —

Contrast vs black: —

Saved Favourites

Click "Save to Favourites" to add colours here.

100% Private

Everything runs in your browser. Images and colours never leave your device.

9 Colour Formats

HEX, RGB, RGBA, HSL, HSV, CMYK, CSS, Tailwind and Android — all at once.

Harmonies & Shades

Complementary, analogous, triadic, tetradic, plus auto-generated tints and shades.

Image Colour Picker

Load an image and click anywhere to grab its exact colour — all local, no upload.

What is the Color Code Generator?

The ToolBajar Color Code Generator is a free, browser-based tool for picking, converting, and designing colours. Choose any colour via the picker, HEX input, RGB sliders, or by clicking on an uploaded image — and instantly get its value in 9 different formats including HEX, RGB, HSL, HSV, CMYK, CSS, Tailwind, and Android XML. Generate colour harmonies, shades, tints, and gradients, save favourites, and preview your colour with live sample text. Everything runs locally — no uploads, no sign-up, no tracking.

Complete Guide to Colour Codes and Formats

How to use this tool

  1. Pick a Colour

    Use the colour picker, type a HEX code, adjust RGB sliders, or load an image and click anywhere on it.

  2. Copy Any Format

    Get the colour in HEX, RGB, HSL, HSV, CMYK, CSS, Tailwind and Android formats — with one-click copy for each.

  3. Explore Harmonies

    Click complementary, analogous, triadic or tetradic to see harmony swatches. Click any swatch to apply it.

  4. Save, Share, Preview

    Save your favourite colours, check contrast against white and black, build gradients and export everything as a palette.

Who should use this tool?

Designers

Build palettes, explore harmonies, and check contrast before you commit to a colour scheme.

Developers

Get the exact CSS, Tailwind or Android colour code with one click and paste it straight into your project.

Brand & Marketing

Lock in your brand colours and generate matching tints and shades for social, print and web.

Everyday Users

Pick a colour from a photo, get its HEX code, and use it anywhere online.

Frequently Asked Questions

Yes — completely free, with no sign-up, no limits, and no watermark on any output.

No. Images are read locally by your browser and processed entirely in JavaScript. Nothing is sent to any server.

Both use Hue (0–360°) and Saturation. HSL's third value is Lightness — where 50% is the pure colour. HSV's third value is Value (brightness) — where 100% is the pure colour. Designers often prefer HSL because lightness is intuitive; HSV is used in many colour pickers and in Adobe products.

Check contrast ratios in the Sample Preview section. Body text should have a contrast of at least 4.5:1. This tool shows you both white-on-colour and black-on-colour ratios so you can see if your text will pass WCAG AA or AAA.

The colour directly opposite yours on the colour wheel — 180° away. Complementary pairs create maximum contrast and are used for bold CTAs, accents, and any time you want the eye to jump. For example, purple pairs with yellow-green.

Absolutely. Colours aren't copyrightable in most jurisdictions — the specific codes you generate are yours to use however you like. Only specific logo combinations or branded palettes might be trademarked, which is a separate concern from the colour codes themselves.