Design tools: colors, gradients, shadows and sizes

Colors, sizes and CSS you enter are processed in your browser tab and are not uploaded.

CSS you can paste

  • Gradient Generator: Build a linear, radial or conic gradient with up to 5 color stops and copy the CSS. Runs on your device.
  • Box Shadow Generator: Set offset, blur, spread, color and opacity for up to 3 shadow layers and copy the CSS. Runs on your device.
  • Border Radius Generator: Round all corners at once or one by one, in px or %, with optional elliptical corners. Runs on your device.
  • PX to REM Converter: Convert px to rem or em and back at any base font size, one value or a whole list. Runs on your device.

Colors

  • Color Palette Generator: Build color harmonies from one base color: complementary, analogous, triadic and more. Runs on your device.
  • Tint and Shade Generator: Make lighter tints and darker shades of one color, in 3 to 10 steps or a 50 to 900 scale. Runs on your device.
  • Color Converter: Convert HEX, RGB, HSL and CMYK and check contrast.

More

About these tools

Pick the tool by what you need to copy out. For CSS, the Gradient Generator builds a linear, radial or conic gradient with 2 to 5 color stops and copies the rule with a plain fallback color. The Box Shadow Generator stacks up to 3 shadow layers, each with an inset switch, and the Border Radius Generator rounds all corners at once or one by one, in px or percent, with elliptical corners. All three show a live preview. For sizes, the PX to REM Converter turns px into rem or em at a base font size you set (a positive number up to 1,000 px), for one value or a list of up to 100, and writes out the working for the first 5.

For colors, the Color Palette Generator builds a scheme from one base color: complementary, analogous, triadic, split-complementary, tetradic or monochromatic. The Tint and Shade Generator makes lighter and darker steps of a single color, and the Color Converter moves a color between HEX, RGB, HSL, HSV and CMYK, checks its contrast against white and black (treating the color as opaque), and finds the nearest CSS color name.

A typical order is to pick a base color and a palette, check the contrast of your text color in the Color Converter, then paste the colors into the gradient and shadow tools. If you start from a picture instead, Image Color Palette pulls out the 3 to 10 main colors you ask for (a picture with fewer distinct colors gives fewer) and Image Color Picker reads the HEX, RGB and HSL of any pixel; both are linked under More. Everything runs in your browser tab, so nothing you enter is sent to a server.

Frequently asked questions

How do I convert px to rem?

Divide the pixels by the root font size. With the usual 16 px base, 24 px is 1.5 rem, and 1.5 rem times 16 is 24 px again. Set the base box if your html element uses another size; it takes a positive number up to 1,000 px. The PX to REM Converter converts up to 100 values at once and writes out the formula for the first 5.

What is the difference between a tint and a shade?

A tint is a color mixed with white, so it gets lighter, and a shade is a color mixed with black, so it gets darker. In the Tint and Shade Generator a 25% tint of #808080 is #A0A0A0 and a 25% shade is #606060.

What do AA and AAA mean in the contrast check?

They are contrast levels from the Web Content Accessibility Guidelines. For normal text, AA needs a ratio of 4.5:1 and AAA needs 7:1; for large text, AA needs 3:1 and AAA needs 4.5:1. The Color Converter shows the ratio of your color against white and against black, and ignores transparency: it treats the color as fully opaque.

Can the Gradient Generator repeat a gradient or use more than 5 stops?

No. It writes 2 to 5 color stops and does not write repeating gradients, custom centers or size keywords. Copy the value and edit it by hand if you need those.