Skip to content
OddsockLocal
Local
Width (px)640
Height (px)360
Background patternstripes
Background color#293145
Second color#7599ae
Pattern spacing (px)32

Result

background: repeating-linear-gradient(45deg, #293145 0 16px, #7599ae 0 32px);
ReadyRuns in this browser. Nothing is uploaded.

How to use

  1. Choose stripes, dots, grid, or checks.
  2. Set the two colors and the spacing in pixels.
  3. Copy the background declaration onto the element.
  4. Increase spacing if the pattern reads as noise, decrease it if it reads as a few giant shapes.

What is CSS patterns?

A repeating background that is an image has to be exported again every time the brand color changes. CSS patterns writes a background declaration for stripes, dots, a grid, or a checker, using the two colors and a spacing value. Spacing opens at 32 pixels. Stripes are a 45-degree repeating linear gradient. Dots are a radial gradient tiled on that spacing. The grid is two 1px linear gradients. Checks are a repeating conic gradient.

Read more

The opening colors are #293145 and #7599ae. A test of the stripe path is a single line you can paste onto a section. There is no PNG. If a slide tool or a video editor needs pixels, the background maker and the pattern maker export a bitmap of the same ideas, at a width and height.

Spacing is the period of the repeat, not a border width. At 8 pixels the pattern becomes texture. At 128 pixels it becomes a graphic. Dots use about a sixth of the spacing as the dot radius, so a huge spacing makes huge dots.

Use cases

  • A stylesheet gets a stripe background that tracks two CSS variables' colors.
  • A draft page uses a dot grid for alignment without an image request.
  • A checker is generated for a transparent-looking preview behind a PNG.
  • A designer tries spacing 16 versus 48 before committing.
  • A component doc shows a pattern that stays sharp on a high-density screen because it is vector paint, not a bitmap.

Diagonal stripes at 32 pixels

Pattern stripes, colors #293145 and #7599ae, spacing 32.

background: repeating-linear-gradient(45deg, #293145 0 16px, #7599ae 0 32px); The half-spacing band is the first color, then the second color finishes the tile.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

The output is CSS. The pattern maker and the background maker write image files when the destination cannot use a stylesheet.