Design tools: colors, contrast, gradients, grid, flexbox and clip-path

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.
  • Clip-path Generator: Pick a polygon, circle, ellipse or inset, drag the points on a live preview and copy the clip-path rule.
  • CSS Clamp Generator: Turn a minimum size, a maximum size and two screen widths into a clamp() value, or a whole fluid type scale. 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.
  • Contrast Checker: Check text and background colors against WCAG 2.x AA and AAA, with a live preview and a passing color suggested.

CSS layout and effects

  • CSS Grid Generator: Set columns, rows, track sizes, gaps and named areas, then copy the grid CSS and a child placement example.
  • Flexbox Generator: Pick direction, wrap, justify, align and gap, then copy the flex CSS with a table of what each value does.
  • Glassmorphism Generator: Set blur, transparency, border and shadow for a frosted glass panel and copy CSS with a fallback.

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. Clip-path Generator cuts an element to a polygon, circle, ellipse or inset shape: you drag the points on a live preview and copy the rule. All four 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.

For layout, CSS Grid Generator sets columns, rows, track sizes, gaps and named areas and copies the grid CSS with a child placement example. Flexbox Generator sets direction, wrap, justify, align and gap and adds a table of what each value does. Glassmorphism CSS Generator sets blur, transparency, border and shadow for a frosted panel and copies CSS with a fallback.

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 and finds the nearest CSS color name. Color Contrast Checker tests text and background colors against WCAG 2.x AA and AAA with a live preview and suggests a passing color.

A typical order is to pick a base color and a palette, check the contrast of your text color in the Color Contrast Checker, 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 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.

How do I make a 3 column CSS grid with equal columns?

In CSS Grid Generator set Columns to 3 and leave Column sizes as 1fr. The page writes grid-template-columns: repeat(3, 1fr);, which makes three columns of equal share. Use 1fr 2fr 1fr instead if the middle column should be twice as wide.

How do I make a triangle or a hexagon with clip-path?

In Clip-path Generator click the Triangle preset for polygon(50% 0%, 0% 100%, 100% 100%) or the Hexagon preset for a six-point polygon. Each pair is the x and y of one corner, in percent of the element, so 50% 0% is the middle of the top edge.