Pixel art

픽셀 아트

Images built from individually visible square pixels — born from the hardware limits of early consoles and arcade games.

Also known as: 8-bit styleBitmap art
···
html
<div class="screen">
  <div class="stars"></div>
  <div class="sprite" id="sprite"></div>
  <div class="ground"></div>
  <span class="hud">SCORE 0120</span>
</div>
css
.screen{position:relative;width:min(90%,300px);aspect-ratio:1.5;overflow:hidden;background:#0d1524;
  border:2px solid #37507a;image-rendering:pixelated}
.stars{position:absolute;inset:0;
  background-image:radial-gradient(1.5px 1.5px at 20% 20%,#9fd,transparent),
    radial-gradient(1.5px 1.5px at 70% 40%,#9fd,transparent),
    radial-gradient(1.5px 1.5px at 40% 70%,#9fd,transparent),
    radial-gradient(1.5px 1.5px at 85% 75%,#9fd,transparent);opacity:.6}
.ground{position:absolute;left:0;right:0;bottom:0;height:18%;background:#274a2e;
  box-shadow:0 -3px 0 #3b6b45}
.sprite{position:absolute;left:38%;bottom:18%;width:7px;height:7px}
.hud{position:absolute;left:8px;top:6px;font:8px/1 "Courier New",monospace;color:#7bffb0;letter-spacing:1px}
js
function pixels(rows, unit, color) {
  const out = [];
  rows.forEach((row, y) => {
    for (let x = 0; x < row.length; x++) {
      if (row[x] === 'X') out.push((x * unit) + 'px ' + (y * unit) + 'px 0 ' + color);
      if (row[x] === 'O') out.push((x * unit) + 'px ' + (y * unit) + 'px 0 #0d1524');
    }
  });
  return out.join(',');
}
const frameA = ['.XXXXX.', 'XXXXXXX', 'XOXXXOX', 'XXXXXXX', '.XXXXX.', '..X.X..', '.X...X.'];
const frameB = ['.XXXXX.', 'XXXXXXX', 'XOXXXOX', 'XXXXXXX', '.XXXXX.', '.X...X.', 'X.....X'];
const sprite = document.getElementById('sprite');
const unit = 7;
let toggled = false;
let dir = 1;
function step() {
  sprite.style.boxShadow = pixels(toggled ? frameB : frameA, unit, '#7bffb0');
  toggled = !toggled;
  const left = parseFloat(sprite.style.left) || 38;
  let next = left + dir * 3;
  if (next > 62) dir = -1;
  if (next < 14) dir = 1;
  sprite.style.left = next + '%';
  sprite.style.transform = dir < 0 ? 'scaleX(-1)' : 'scaleX(1)';
}
step();
setInterval(step, 380);

1970s–90s game consoles had extremely limited resolution and color counts (the NES could show about 25 colors on screen). Drawing characters and backgrounds within that constraint naturally meant working pixel-by-pixel on a grid, and the constraint itself became an aesthetic.

Today, with no hardware limits at all, plenty of games still choose it deliberately — indie titles like Stardew Valley and Undertale are the classic examples — both for retro nostalgia and because it lets a small team produce a lot of assets cheaply. Building it for the web needs image-rendering: pixelated so scaling doesn't blur it (the default smooths and mushes pixel boundaries), and pure CSS can even draw a small image by stacking many box-shadow values at pixel-grid coordinates.

Bitmap fonts snapped to the same pixel grid usually accompany it for consistency. It fits games, retro-themed events and a developer's personal site more than serious information-heavy UI.