miwale

Neon Midnight — Game Art Style Spec

Glowing neon tube line-art with baked halos on a near-black holographic floor of circuit, hex and halftone regions.

Every character and prop is drawn as glowing tubes: a saturated coloured line with a near-white "hot" core, on top of a soft halo that is pre-blurred once at load time, around a near-black tinted glass fill. The floor is a dark midnight board split into noise-shaped districts, each with its own faint additive pattern (violet grid, teal hexagons, magenta halftone dots, copper circuit traces, blue water scanlines), separated by thin glowing contour lines. Scanlines, a violet vignette and short chromatic glitches finish the look: a Halloween rave at 23:59 — black, electric and crisp.

At a glance

FamilyVector · Neon
Moodelectric, nocturnal, synthwave, rave, crisp
Best forarcade shooters, top-down arena action with crowded screens, twin-stick / bullet-hell games, rhythm games, retro-futuristic puzzles
RendererCanvas 2D, fully procedural, no image assets
Pixel artNo – native resolution, sprites baked at 4 px per world unit
Complexity3/10 – new assets are line drawings plus the shared glow bake; the risk is restraint: too many effects get garish
FontsOrbitron (HUD), Monoton (titles), Audiowide (brand), Rajdhani (body)
Key colours#05040d void · #ff7a1a character orange · #ff3ad6 magenta · #6ff4ff cyan · #b44dff acid · #8dff2a toxic · #c6ff3a lime

When to use it

Good fits:

Bad fits:

Color palette

SwatchHexRole
Void#05040dCanvas/page background, ~60 % of the screen
Midnight floor#06050fGround fallback colour
Character orange#ff7a1aMain character head outline, its floor light, its dissolve fragments
Amber#ffae35Main character body/limbs, celebration ring, lanterns
Back-limb amber#c8761cLimbs on the far side of the main character
Scarf yellow#ffe14aMain character accent, projectile sparks
Stem green#9cff4aStems and small organic accents
Magenta#ff3ad6Small creature outline, counter glow
Violet#b066ffCreature leaves, secondary creature lines
Root lilac#d77bffCreature legs/roots
Cyan#6ff4ffFast floating creature, HUD labels and frames
Ice#eaffffHighlights on cyan subjects
Acid violet#b44dffLarge creature outline
Acid dark#7a38d6Large creature facet lines
Toxic green#8dff2aLarge creature core, cracks, eyes, footfall rings
Lime#c6ff3aSmall collectible gems, badge
Gem cyan#45f4ffLarge collectible gems
Seed orange#ff9a2eProjectile
Lavender / dark#c3b5ff / #6a5ad0Props (gravestones, fences) front / back edges
Pink sign#ff4fd8Pylons, sign frames, bar border
Flash pink#ff2a7aImpact flash, chroma split (with cyan #2ae8ff)

Body fills (always near-black, alpha 0.95–0.97): main character rgba(26,10,3,.96), its pumpkin head rgba(30,9,2,.97), small creature rgba(32,4,34,.96), large creature rgba(22,6,38,.97), fast floating creature rgba(6,26,44,.58) (the only translucent body), props rgba(12,8,30,.95).

Palette rules:

Typography

/* timer: gradient-filled numbers with two drop-shadow glows */
.clock-time{font:900 38px/1.05 'Orbitron',sans-serif;letter-spacing:3px;
  background:linear-gradient(180deg,#fff7e0 0%,#ffd36b 36%,#ff7a1a 62%,#ff2bd0 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 0 5px rgba(255,90,40,.8)) drop-shadow(0 0 16px rgba(255,43,208,.55))}
.clock-label{font:600 10px 'Orbitron',sans-serif;letter-spacing:5px;color:#8ff8ff;text-shadow:0 0 6px #1ed8ff}
.title{font:400 68px/1 'Monoton',cursive;color:#ffd36b;letter-spacing:6px;
  text-shadow:0 0 6px #ff8a1f,0 0 18px #ff3ad6,0 0 42px rgba(255,43,208,.7)}
.desc{font:600 17px 'Rajdhani',sans-serif;color:#b8f6ff;text-shadow:0 0 6px rgba(40,200,255,.45)}

Text effects: always a pale tinted fill (#ffe6fb, #d8f8ff, #ffe2b0) plus 1–3 text-shadow layers in the saturated hue (6 px, 14–18 px, 42 px). Labels use wide letter-spacing (3–5 px), uppercase. Floating numbers are baked into a digit atlas (Orbitron 46 px): blur 6 px + blur 2 px glow fill (#2fd8ff normal, #ff6a1a emphasised), a 6 px dark edge stroke (rgba(3,8,26,.92)), then the fill (#f4fdff normal, #ffe58a emphasised, weight 900). Rendered 8.6 u tall (12.5 u for the emphasised variant) with a pop-in scale.

Rendering technique

  1. Sprite pass functions. Each drawable is a function pose(ctx, pass, phase) that issues the same paths twice: pass = 'full' and pass = 'glow'. Two helpers decide what each pass does:
    • tube(ctx, pass, col, lw): full → stroke col at lw, then a core stroke at lw*0.36 in mix(col, white, 0.62). Glow → stroke col at lw*1.8. Options: hot:false (no core – for detail lines), glow:false (no halo), gw (halo width factor), glowCol, hotCol.
    • fillIn(ctx, pass, fillCol, glowCol): full → near-black fill; glow → optional glowing fill (faces, eyes, cores).
  2. Bake (bakeSet, K = 4 px/unit, round caps/joins): render both passes into separate canvases, then composite onto a third: glow pass with filter: blur(2.2u*K px) at alpha 0.7, (extra copy at 0.7*(glowA−1) if glowA > 1.2), glow pass with blur(0.6u*K px) at alpha 0.6, then the sharp full pass at alpha 1. The large creature uses wide = 2.6, gems wide 1.6/tight 0.5, lanterns wide 3.0/tight 0.8/glowA 1.5.
  3. Character variants (makeSprite): for every frame bake right-facing, mirror it for left-facing, and create silhouette copies of the sharp pass tinted white #ffffff, magenta #ff2a7a and cyan #2ae8ff (via source-atop fill). These are the impact flash and chroma split.
  4. Props (bakeProp): baked like sprites, plus an elliptical floor pool and a floor reflection (see Props). Hologram props get 0.55 u gaps punched out every 2.2 u with destination-out.
  5. Ground is baked per 256 u chunk (resolution up to 2.5 px/u), incrementally with a generator. See World and ground.
  6. Per frame, draw order (world space, 360 u visible vertically): ground chunks → contact pools → additive ground overlay (main-character light spill, lantern glows) → props and characters y-sorted (one drawImage each; additive flash copies on top during an impact) → projectiles (additive) → particles (collected into buckets and flushed as a few additive strokes) → floating numbers → screen glitch → display overlay (scanlines + vignette + fringe, cached per resolution).
  7. No pixel snapping, no low-res buffer. Smooth scaling of the 4 px/u sprites is fine; at 1080p one unit is 3 px, so sprites are slightly supersampled.

World and ground

The floor is "a circuit board seen at night" split into districts. It is near-black throughout (< 15 % brightness) so anything placed on it outshines it.

  1. Fields. Per world point sample 4 fbm fields (2 octaves) with domain warp: q = fbm(x/1150, y/1150) − 0.5, X = x/1050 + q*1.3. Also a water field fbm(x/560 …, 3 oct) and a slow brightness field fbm(x/240). Sample on a 4 u grid with a 2-cell margin so chunks match.
  2. Base colour. Softmax of the 4 fields with temperature 0.012 (nearly hard borders, a 1–2 cell blend) mixes the bases: violet rgb(8,8,32), teal rgb(3,15,21), magenta rgb(30,4,22), copper rgb(14,9,15). Water (smoothstep(0.625, 0.645, wat)) mixes in rgb(2,9,30). Multiply by 0.7 + 0.6*bright. Put it in a tiny ImageData and draw it scaled up with smoothing. Fallback ground colour #06050f.
  3. Patterns. Each region draws its full pattern on a scratch canvas, then destination-in with its upscaled weight mask (alpha = weight × (0.42 + 0.58·smoothstep(0.3, 0.7, bright))), then composites onto the chunk with lighter:
    • Violet grid: 8 u lines at rgba(120,80,255,.16), every 32 u a 4 px halo rgba(120,70,255,.1) + 1 px rgba(165,115,255,.5), a 5.2 u cross rgba(225,200,255,.85) every 64 u.
    • Teal hex: pointy hexes of radius 9 u, 1 px rgba(40,215,195,.34); 7.5 % of cells lit with fill rgba(40,215,195,.075) and inner hex at 52 % radius rgba(100,255,230,.6); 2.5 % get a 1.1 u dot.
    • Magenta halftone: staggered 6 u grid, dot radius 0.42 + 1.25*smoothstep(0.3,0.78,noise(x/120,y/120)), rgba(255,70,200,.52); 1.2 % big dots (0.9 u bright + 2.6 u ring).
    • Copper circuit: in 26 u cells (42 % chance) a trace of 2–3 segments, 8–26 u long, turning ±45°, 0.6 u rgba(255,150,60,.38); 45 % of traces are 2–3 parallel offset lines 2.8 u apart. End pads r 1.2 u ring, start vias r 0.7 u filled; chips (96 u cells, 30 %): 10–16 × 6–10 u rectangles with 2 u pins.
    • Water: 1 px horizontal lines every 2 u rgba(40,130,255,.24) plus moonlight glints 2–12 u long (rgba(90,190,255,.55) / rgba(200,240,255,.8)).
  4. Ground decals (lighter): star dust squares 0.3–0.75 u in pale lilac/white/cyan/pink at 22–55 % (about one per 11 u cell); line glyphs 1.8–3.2 u (cross, moon, star, diamond, triangle, ring, chevrons, bat, rune; 13 % are small pumpkins in #ff9a3c), each stroked 2.2 u at 16 % + 0.5 u at full; landmarks 18–28 u (targets with tick rings, clock faces at 23:59, moons with stars) stroked 5 u/5 %, 1.8 u/16 %, 0.55 u/42 %.
  5. Contours. Marching squares on field_i − max(other fields) at iso 0 (skipping water cells) and on the water field at iso 0.635 and 0.657. Each segment set is stroked three times additively (glowStroke): 6 u at 5 %·k, 2 u at 15 %·k, 1.15 px at 62 %·k in the line colour mixed 35 % to white. Line colours: violet rgb(136,104,255), teal rgb(30,214,196), magenta rgb(255,64,206), copper rgb(255,150,64); water rgb(90,200,255) (k 1.15) and an inner contour rgb(60,150,255) (k 0.45).

Scale: districts are 300–800 u across, so a screen usually shows 2–3 of them and one border curve.

Characters

All characters are outline drawings made of neon tubes over near-black glass fills: one dominant outline colour per type with a hot near-white core (36 % width, colour mixed 62 % to white), thinner interior details (0.3–0.7 u) without a core, round caps and joins, a 1.8× halo baked once (blur 2.2 u at 70 % + 0.6 u at 60 %). Each body part is a separate path. Every character type owns one hue family and one strong silhouette.

Main character (feet at 0,0, ~18 u wide, ~30 u tall, faces right) – a small stick-limbed figure with a round carved pumpkin head and a trailing scarf:

Small creature (~18 × 27 u) – a purple-magenta root bulb with a leafy top: a bulb (bezier, −8.9..8.9 × −20..−4.2) outlined magenta #ff3ad6 1.25 u, filled rgba(32,4,34,.96); the top part above a sine wave line is tinted rgba(170,40,215,.42) (clipped) with a violet 0.6 u wave line – a "liquid level" that suggests volume. Three violet #b066ff leaves on top (0.8 u), lilac #d77bff root legs (0.95 u), angry slanted triangle eyes filled #ffeafb glowing #ff5fe4, a zig-zag mouth #ffa6f2. 8 frames, bob 1.2 u, rock ±0.09 rad. Contact pool magenta, dark 0.5 / rim 0.2.

Fast creature (~22 × 30 u) – a floating sheet spirit: a dome head (radius 6.6 u) and a wavy hem whose control points move with three phase-shifted sines. Fill is translucent rgba(6,26,44,.58), inner rim rgba(111,244,255,.2) 3.4 u clipped inside, outline cyan #6ff4ff 1.15 u. Black hollow oval eyes and mouth (#010409) with 0.42 u cyan rims and tiny white pupils, three-fingered stick arms, two twinkling white star sparkles with cyan glow (frost sparkles). 6 frames, glowA 1.15; hovers 2.5 u above its pool with ±1.3 u float. Contact pool cyan, dark 0.22 / rim 0.16 (it floats).

Large creature (~40 × 52 u, scaled 0.92) – a faceted crystal golem: a 12-point crystal body outlined acid violet #b44dff 1.4 u, filled rgba(22,6,38,.97); an inner hexagon connected to the outline by 11 facet lines in #7a38d6 0.55 u (no core) – this faceting is its whole shading. Top band tinted rgba(150,60,230,.32). Thick arms drawn as a 5.4 u violet stroke with a 3.3 u dark stroke inside (a hollow tube), hex fists, block legs, three jagged crown leaves. Toxic green #8dff2a cracks (0.6 u) radiate from a pulsing hex core filled #fbfff0 → #c8ff6a → #45c414, and two slit eyes 1.35 u. Footfalls emit a squashed green ring 14 → 30 u. Contact pool toxic green, dark 0.55 / rim 0.2.

Contact pool size for creatures = creature radius × 1.45 (fast floating creature × 1.3).

Readability rules for crowded scenes:

Props

Props are scenery sprites drawn with the same tube + glass logic as characters but in their own hues – lavender, pink, teal and cyan, never the creature colours – and at lower brightness so they never compete with characters.

Effects and particles

All effects are additive (globalCompositeOperation = 'lighter') and use only the source's own colours plus white.

Atmosphere and lighting

UI

Panels are near-black translucent with a 1 px neon border and an outer glow; bars are skewed −22° and segmented every 25 px; numbers are Orbitron with gradient fills and glow. Choice cards stand over a CSS perspective grid (magenta 1 px lines, 64 × 34 px, rotateX(62deg)) with magenta corner brackets and a cyan border. Icons are drawn with the same tube logic (shadowBlur = size/9, line 4.6 px at 96 px icon size, 7.5 px when ≤ 48 px, a hot core at 36 %).

.hud-panel{background:linear-gradient(90deg,rgba(30,6,40,.88),rgba(6,10,30,.88));border:1px solid rgba(255,79,216,.75);
  border-radius:2px;box-shadow:0 0 14px rgba(255,60,200,.35),inset 0 0 10px rgba(80,220,255,.15);
  font:600 13px 'Rajdhani',sans-serif;color:#d8f8ff}
.bar{position:relative;width:250px;height:15px;transform:skewX(-22deg);background:rgba(22,4,26,.82);
  border:1px solid #ff4fd8;box-shadow:0 0 12px rgba(255,60,200,.6),inset 0 0 8px rgba(0,0,0,.9)}
.bar-fill{height:100%;background:linear-gradient(90deg,#ff2bd0,#ff5a6a 45%,#ff8a1f 80%,#ffc23a);box-shadow:0 0 14px rgba(255,100,60,.9)}
.bar::after{content:'';position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 23px,rgba(10,2,14,.85) 23px 25px)}
.meter{position:relative;height:12px;background:rgba(8,4,22,.8);border:1px solid rgba(180,120,255,.7);border-radius:2px;
  box-shadow:0 0 10px rgba(160,80,255,.5),inset 0 0 6px rgba(0,0,0,.9)}
.meter-fill{height:100%;background:linear-gradient(90deg,#2af0ff 0%,#7dffb0 60%,#c6ff3a 100%);box-shadow:0 0 12px rgba(120,255,200,.8)}
.badge{padding:1px 9px;background:#0b0620;border:1px solid #c6ff3a;font:700 11px 'Orbitron',sans-serif;color:#eaffc0;
  letter-spacing:1px;text-shadow:0 0 6px #b6ff3a;box-shadow:0 0 10px rgba(198,255,58,.55)}
.counter{font:800 24px 'Orbitron',sans-serif;color:#ffe6fb;text-shadow:0 0 8px #ff3ad6,0 0 18px rgba(255,58,214,.55)}
.card{background:linear-gradient(170deg,rgba(74,24,124,.62),rgba(10,6,30,.93) 58%,rgba(6,20,42,.93));
  border:1px solid rgba(111,244,255,.85);border-radius:3px;
  box-shadow:0 0 18px rgba(60,220,255,.38),inset 0 0 26px rgba(170,80,255,.32),inset 0 1px 0 rgba(255,255,255,.25)}
.card:hover{transform:translateY(-8px);border-color:#ffd36b;box-shadow:0 0 28px rgba(255,160,60,.55),inset 0 0 30px rgba(255,120,40,.25)}
.overlay{background:repeating-linear-gradient(0deg,rgba(0,0,0,.16) 0 1px,transparent 1px 3px),
  radial-gradient(ellipse at 50% 42%,rgba(52,12,88,.6),rgba(3,2,12,.9) 72%)}

Motion and animation

Do and don't

Do:

Don't:

Implementation recipe

  1. Set up a Canvas 2D scene with a world-space camera; pick a vertical view of ~360 world units and a main character ~18 × 30 u.
  2. Copy the helpers from starter.js: tube, fillIn, bakeSet, makeSprite, tint, flip, makePool.
  3. Define your palette: background #05040d, then one hue family per subject type (main character warm orange/amber/yellow; creatures magenta, cyan, acid violet + toxic green; collectibles lime/cyan; props lavender/pink/teal).
  4. Write each character as pose(ctx, pass, phase) with feet at (0,0), facing right: closed silhouette paths → fillIn(dark glass) → outline tube(col, 1.15–1.4) → thinner detail tubes (hot:false) → glowing eyes/faces via fillIn(fill, glowFill).
  5. At load time bake N frames per character with makeSprite(left, top, right, bottom, pose) (8 walk frames, 6 for floaters), which yields both facings + white/magenta/cyan silhouettes.
  6. Bake props with a floor pool, a 36 % reflection and (for holograms) scan gaps.
  7. Build the floor: dark base + region patterns (grid / hex / halftone / circuit / water) masked by noise regions and added with lighter, star dust, faint glyphs, glowing marching-squares borders. Bake per chunk.
  8. Each frame: ground → contact pools → additive light spill → y-sorted sprites (drawImage) → additive flashes → projectiles → batched additive particles → numbers → glitch → cached overlay.
  9. Effects: line sparks, line fragments and squashed rings in the source's colours plus white, always two strokes (3.2× at 28 %, 1× at 100 %).
  10. HUD: Orbitron numbers with gradient + glow, skewed segmented bars, 1 px neon borders, Monoton titles.
  11. Check readability with 200 creatures on screen; if it blooms out, reduce halo alpha (glowA), not the line colour.

Code

The snippets below are the core techniques, cleaned up from the style module. starter.js in this folder contains all of them plus the main character, three creature types, gems, the procedural floor and a complete preview scene. The full reference implementation is ../../js/styles/neon.js.

// Neon tube + glass fill: the same path is drawn in a 'full' and a 'glow' pass.
const hot = (hex, k = 0.62) => { const c = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16));
  return 'rgb(' + c.map((v) => Math.round(v + (255 - v) * k)).join(',') + ')'; };
function tube(c, pass, col, lw, o = {}) {
  if (pass === 'full') {
    c.strokeStyle = col; c.lineWidth = lw; c.stroke();
    if (o.hot !== false) { c.strokeStyle = o.hotCol || hot(col); c.lineWidth = lw * 0.36; c.stroke(); }
  } else if (o.glow !== false) { c.strokeStyle = o.glowCol || col; c.lineWidth = lw * (o.gw || 1.8); c.stroke(); }
}
function fillIn(c, pass, col, glowCol) {
  if (pass === 'full') { if (col) { c.fillStyle = col; c.fill(); } } else if (glowCol) { c.fillStyle = glowCol; c.fill(); }
}
// Bake once: blurred glow pass (wide + tight) under the sharp pass. K = px per world unit.
const K = 4;
function mk(w, h) { const c = document.createElement('canvas'); c.width = w; c.height = h; return c; }
function bakeSet(l, t, r, b, draw, { wide = 2.2, tight = 0.6, glowA = 1 } = {}) {
  const w = Math.ceil((l + r) * K), h = Math.ceil((t + b) * K);
  const pass = (p) => { const c = mk(w, h), x = c.getContext('2d');
    x.lineCap = 'round'; x.lineJoin = 'round'; x.setTransform(K, 0, 0, K, l * K, t * K); draw(x, p); return c; };
  const full = pass('full'), glow = pass('glow'), out = mk(w, h), x = out.getContext('2d');
  x.filter = `blur(${wide * K}px)`; x.globalAlpha = Math.min(1, 0.7 * glowA); x.drawImage(glow, 0, 0);
  if (glowA > 1.2) { x.globalAlpha = Math.min(1, 0.7 * (glowA - 1)); x.drawImage(glow, 0, 0); }
  x.filter = `blur(${tight * K}px)`; x.globalAlpha = Math.min(1, 0.6 * glowA); x.drawImage(glow, 0, 0);
  x.filter = 'none'; x.globalAlpha = 1; x.drawImage(full, 0, 0);
  return { img: out, full, w: w / K, h: h / K, ax: (l * K) / w, ay: (t * K) / h };
}
// Usage: world-space draw of the main character with its feet as anchor
// const s = bakeSet(16, 38, 16, 6, (c, p) => heroPose(c, p, 0));
// ctx.drawImage(s.img, x - s.ax * s.w, y - s.ay * s.h, s.w, s.h);
// Impact flash + chroma split from silhouette copies of the sharp pass.
function tint(src, col) { const c = mk(src.width, src.height), x = c.getContext('2d');
  x.drawImage(src, 0, 0); x.globalCompositeOperation = 'source-atop'; x.fillStyle = col; x.fillRect(0, 0, c.width, c.height); return c; }
// at bake: s.flash = tint(s.full, '#ffffff'); s.red = tint(s.full, '#ff2a7a'); s.cyan = tint(s.full, '#2ae8ff');
function drawHit(ctx, s, x, y, flash) {
  const at = (img, dx) => ctx.drawImage(img, x + dx - s.ax * s.w, y - s.ay * s.h, s.w, s.h);
  ctx.globalCompositeOperation = 'lighter';
  ctx.globalAlpha = Math.min(1, flash * 1.2); at(s.flash, 0);
  if (flash > 0.5) { ctx.globalAlpha = 0.75 * flash; at(s.red, -1.4); at(s.cyan, 1.4); }
  ctx.globalAlpha = 1; ctx.globalCompositeOperation = 'source-over';
}
// Batched additive particles: one path per colour/alpha bucket, stroked as halo + core.
const buckets = new Map();
function bucket(color, alpha, lwClass) {
  const aq = alpha > 0.82 ? 4 : alpha > 0.55 ? 3 : alpha > 0.3 ? 2 : 1, key = color + aq + lwClass;
  if (!buckets.has(key)) buckets.set(key, { color, a: aq / 4, lw: [0.45, 0.8, 1.3][lwClass], lines: [], rings: [] });
  return buckets.get(key);
}
function flush(ctx) {
  ctx.save(); ctx.globalCompositeOperation = 'lighter'; ctx.lineCap = 'round';
  for (const b of buckets.values()) {
    if (!b.lines.length && !b.rings.length) continue;
    ctx.beginPath();
    for (let i = 0; i < b.lines.length; i += 4) { ctx.moveTo(b.lines[i], b.lines[i + 1]); ctx.lineTo(b.lines[i + 2], b.lines[i + 3]); }
    for (let i = 0; i < b.rings.length; i += 4) { const [x, y, rx, ry] = b.rings.slice(i, i + 4);
      ctx.moveTo(x + rx, y); ctx.ellipse(x, y, rx, ry, 0, 0, Math.PI * 2); }
    ctx.strokeStyle = b.color;
    ctx.globalAlpha = b.a * 0.28; ctx.lineWidth = b.lw * 3.2; ctx.stroke();
    ctx.globalAlpha = b.a; ctx.lineWidth = b.lw; ctx.stroke();
    b.lines.length = 0; b.rings.length = 0;
  }
  ctx.restore();
}
// spark: bucket(col, life, 1).lines.push(x, y, x - vx/sp * L, y - vy/sp * L); floor ring: rings.push(x, y, r, r * 0.42)
// Glowing region border: three additive strokes of one Path2D (world units; px = 1 / pixelsPerUnit).
function glowStroke(ctx, path, rgb, px, k) {
  const c = (a, m = 0) => `rgba(${rgb.map((v) => Math.round(v + (255 - v) * m)).join(',')},${a})`;
  ctx.globalCompositeOperation = 'lighter';
  ctx.strokeStyle = c(0.05 * k); ctx.lineWidth = 6; ctx.stroke(path);
  ctx.strokeStyle = c(0.15 * k); ctx.lineWidth = 2; ctx.stroke(path);
  ctx.strokeStyle = c(0.62 * k, 0.35); ctx.lineWidth = 1.15 * px; ctx.stroke(path);
  ctx.globalCompositeOperation = 'source-over';
}

Adapting it to your project

Keep fixed (this is the style):

May change:

Performance notes

Copy-paste prompt

Use the Neon Midnight art style for my project (Canvas 2D, procedural, no image assets):
- Background near-black #05040d; colour exists only as emitted light. At least 60 % of the screen stays black.
- Every sprite is neon tube line-art: draw each path twice, a 'full' pass (line in colour + a core stroke at 36 % width
  in the colour mixed 62 % to white) and a 'glow' pass (same path at 1.8x width). At load time blur the glow pass
  (blur 2.2 world units at 70 % alpha + 0.6 units at 60 %) and stamp the sharp pass on top. Never blur per frame.
- Bodies are closed silhouettes filled with near-black glass of their own hue (alpha 0.95); faces/eyes are the brightest fill.
- Line widths at a 360-unit-tall view: silhouettes 1.15–1.4, limbs ~1.0, details 0.3–0.7 (no hot core). Round caps/joins.
- One hue family per subject type: main character orange #ff7a1a / amber #ffae35 / yellow #ffe14a; small creature magenta #ff3ad6
  + violet #b066ff; fast creature cyan #6ff4ff; large creature acid violet #b44dff with toxic green #8dff2a core;
  collectibles lime #c6ff3a / cyan #45f4ff; props lavender #c3b5ff, pink #ff4fd8, teal #38f5d6 with a floor pool + 36 % reflection.
- Bake 8 walk frames per character, mirrored copies, and white/#ff2a7a/#2ae8ff silhouettes for impact flash + chroma split.
- No shadows: contact pools (dark core, coloured rim ellipse) and additive floor light under light sources.
- Floor: dark noise districts with faint additive patterns (violet grid, teal hexes, magenta halftone, copper circuit traces,
  blue water lines) ≤ 0.5 alpha, separated by thin glowing contour lines; sparse star dust.
- Effects are additive ('lighter'), in the source's colours + white: line sparks, line fragments, rings squashed to 42 %,
  each stroked twice (3.2x width at 28 % alpha, then 1x). Batch particles by colour.
- Atmosphere: 1 px scanlines every 3 px at 12 %, violet vignette, magenta-left/cyan-right lens fringe, short glitch on big impacts.
- UI: Orbitron numbers with gradient fill + glow, skewed segmented bars, 1 px neon borders, Monoton titles, Rajdhani body.