<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lite-Brite: Hello World</title>
<style>
:root {
--bg-color: #121214;
--board-color: #1c1c20;
--board-border: #333338;
--hole-bg: #09090b;
--hole-border: #18181c;
--c-red: #ff2a55;
--c-orange: #ff7b00;
--c-yellow: #ffee00;
--c-green: #00ff66;
--c-blue: #00bfff;
--c-pink: #ff33cc;
--c-white: #eef8ff;
}
* {
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
}
body {
margin: 0;
min-height: 100vh;
background: radial-gradient(circle at center, #1a1a24 0%, #08080a 100%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #fff;
padding: 20px;
overflow-x: hidden;
}
/* Outer Toy Case Frame */
.case {
background: linear-gradient(145deg, #2b2b32, #18181c);
padding: 24px;
border-radius: 20px;
box-shadow:
0 20px 50px rgba(0, 0, 0, 0.9),
inset 0 2px 4px rgba(255, 255, 255, 0.1),
inset 0 -4px 8px rgba(0, 0, 0, 0.6);
border: 4px solid #3a3a44;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
/* Lite-Brite Retro Header Badge */
.brand-banner {
font-family: 'Impact', sans-serif;
font-size: 26px;
letter-spacing: 4px;
text-transform: uppercase;
display: flex;
gap: 6px;
text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.brand-banner span:nth-child(1) { color: var(--c-red); text-shadow: 0 0 8px var(--c-red); }
.brand-banner span:nth-child(2) { color: var(--c-orange); text-shadow: 0 0 8px var(--c-orange); }
.brand-banner span:nth-child(3) { color: var(--c-yellow); text-shadow: 0 0 8px var(--c-yellow); }
.brand-banner span:nth-child(4) { color: var(--c-green); text-shadow: 0 0 8px var(--c-green); }
.brand-banner span:nth-child(5) { color: var(--c-blue); text-shadow: 0 0 8px var(--c-blue); }
.brand-banner span:nth-child(6) { color: var(--c-pink); text-shadow: 0 0 8px var(--c-pink); }
.brand-banner span:nth-child(7) { color: var(--c-white); text-shadow: 0 0 8px var(--c-white); }
.brand-banner span:nth-child(8) { color: var(--c-yellow); text-shadow: 0 0 8px var(--c-yellow); }
.brand-banner span:nth-child(9) { color: var(--c-red); text-shadow: 0 0 8px var(--c-red); }
/* The Black Peg Screen */
.screen {
background-color: #050507;
padding: 18px;
border-radius: 10px;
box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.95), 0 0 0 2px #111;
display: grid;
gap: 6px;
touch-action: none;
}
/* Peg Holes */
.hole {
width: 14px;
height: 14px;
border-radius: 50%;
background: #000;
border: 1px solid #141416;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
cursor: pointer;
position: relative;
transition: transform 0.08s ease;
}
.hole:hover {
border-color: #444;
}
/* Placed Translucent Glowing Pegs */
.peg {
border: 1px solid rgba(255, 255, 255, 0.7) !important;
transform: scale(1.15);
z-index: 2;
}
.peg::after {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 3px;
height: 3px;
background: #ffffff;
border-radius: 50%;
opacity: 0.8;
}
/* Glow Colors */
.c-red { background: var(--c-red); box-shadow: 0 0 12px 2px var(--c-red), inset 0 0 3px #fff; }
.c-orange { background: var(--c-orange); box-shadow: 0 0 12px 2px var(--c-orange), inset 0 0 3px #fff; }
.c-yellow { background: var(--c-yellow); box-shadow: 0 0 12px 2px var(--c-yellow), inset 0 0 3px #fff; }
.c-green { background: var(--c-green); box-shadow: 0 0 12px 2px var(--c-green), inset 0 0 3px #fff; }
.c-blue { background: var(--c-blue); box-shadow: 0 0 12px 2px var(--c-blue), inset 0 0 3px #fff; }
.c-pink { background: var(--c-pink); box-shadow: 0 0 12px 2px var(--c-pink), inset 0 0 3px #fff; }
.c-white { background: var(--c-white); box-shadow: 0 0 12px 2px var(--c-white), inset 0 0 3px #fff; }
/* Controls & Peg Palette */
.controls {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
width: 100%;
gap: 12px;
margin-top: 4px;
}
.palette {
display: flex;
gap: 10px;
background: #111115;
padding: 8px 14px;
border-radius: 30px;
border: 1px solid #333;
align-items: center;
}
.palette-label {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 1px;
color: #777;
margin-right: 4px;
}
.peg-choice {
width: 22px;
height: 22px;
border-radius: 50%;
cursor: pointer;
border: 2px solid transparent;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.peg-choice:hover {
transform: scale(1.2);
}
.peg-choice.active {
transform: scale(1.25);
border-color: #fff;
}
.buttons {
display: flex;
gap: 8px;
}
button {
background: #25252d;
border: 1px solid #444450;
color: #ddd;
padding: 8px 14px;
border-radius: 6px;
cursor: pointer;
font-weight: bold;
font-size: 12px;
letter-spacing: 0.5px;
text-transform: uppercase;
transition: all 0.15s ease;
}
button:hover {
background: #34343f;
color: #fff;
border-color: #666;
}
button:active {
transform: scale(0.96);
}
.instructions {
font-size: 12px;
color: #777;
text-align: center;
}
</style>
</head>
<body>
<div class="case">
<div class="brand-banner">
<span>L</span><span>I</span><span>T</span><span>E</span>
<span>-</span>
<span>B</span><span>R</span><span>I</span><span>T</span><span>E</span>
</div>
<div id="screen" class="screen"></div>
<div class="controls">
<div class="palette">
<span class="palette-label">Pegs:</span>
<div class="peg-choice c-red active" data-color="c-red"></div>
<div class="peg-choice c-orange" data-color="c-orange"></div>
<div class="peg-choice c-yellow" data-color="c-yellow"></div>
<div class="peg-choice c-green" data-color="c-green"></div>
<div class="peg-choice c-blue" data-color="c-blue"></div>
<div class="peg-choice c-pink" data-color="c-pink"></div>
<div class="peg-choice c-white" data-color="c-white"></div>
<div class="peg-choice" data-color="" title="Eraser" style="background:#222; border:1px dashed #666;"></div>
</div>
<div class="buttons">
<button id="btnReset">Reset Hello World</button>
<button id="btnClear">Clear Board</button>
</div>
</div>
</div>
<p class="instructions">Click or drag across holes to insert pegs. Click a peg with the same color to remove it.</p>
<script>
const COLS = 31;
const ROWS = 13;
const screen = document.getElementById('screen');
let currentColor = 'c-red';
let isDrawing = false;
// Set grid dimensions in CSS
screen.style.gridTemplateColumns = `repeat(${COLS}, 14px)`;
screen.style.gridTemplateRows = `repeat(${ROWS}, 14px)`;
// 5x3 Dot-Matrix Font for "HELLO WORLD"
const FONT = {
'H': ["101", "101", "111", "101", "101"],
'E': ["111", "100", "111", "100", "111"],
'L': ["100", "100", "100", "100", "111"],
'O': ["111", "101", "101", "101", "111"],
'W': ["101", "101", "101", "111", "101"],
'R': ["110", "101", "110", "101", "101"],
'D': ["110", "101", "101", "101", "110"]
};
// Color palette selector
document.querySelectorAll('.peg-choice').forEach(choice => {
choice.addEventListener('click', () => {
document.querySelectorAll('.peg-choice').forEach(c => c.classList.remove('active'));
choice.classList.add('active');
currentColor = choice.getAttribute('data-color');
});
});
// Create the physical board holes
const holes = [];
for (let r = 0; r < ROWS; r++) {
holes[r] = [];
for (let c = 0; c < COLS; c++) {
const hole = document.createElement('div');
hole.classList.add('hole');
hole.dataset.row = r;
hole.dataset.col = c;
// Mouse interactions
hole.addEventListener('pointerdown', (e) => {
isDrawing = true;
togglePeg(hole);
hole.releasePointerCapture(e.pointerId);
});
hole.addEventListener('pointerenter', () => {
if (isDrawing) {
applyPeg(hole);
}
});
screen.appendChild(hole);
holes[r][c] = hole;
}
}
window.addEventListener('pointerup', () => { isDrawing = false; });
function setPeg(r, c, colorClass) {
if (r >= 0 && r < ROWS && c >= 0 && c < COLS) {
const hole = holes[r][c];
hole.className = 'hole'; // reset classes
if (colorClass) {
hole.classList.add('peg', colorClass);
}
}
}
function togglePeg(hole) {
if (!currentColor) {
// Eraser mode
hole.className = 'hole';
return;
}
if (hole.classList.contains('peg') && hole.classList.contains(currentColor)) {
hole.className = 'hole';
} else {
hole.className = `hole peg ${currentColor}`;
}
}
function applyPeg(hole) {
if (!currentColor) {
hole.className = 'hole';
} else {
hole.className = `hole peg ${currentColor}`;
}
}
// Render text with specific starting coordinates and neon colors
function drawWord(word, startRow, startCol, colorClass) {
let currentCol = startCol;
for (const char of word) {
const glyph = FONT[char];
if (glyph) {
for (let r = 0; r < 5; r++) {
for (let c = 0; c < 3; c++) {
if (glyph[r][c] === '1') {
setPeg(startRow + r, currentCol + c, colorClass);
}
}
}
currentCol += 4; // 3 width + 1 spacing
}
}
}
function clearBoard() {
for (let r = 0; r < ROWS; r++) {
for (let c = 0; c < COLS; c++) {
holes[r][c].className = 'hole';
}
}
}
function loadHelloWorld() {
clearBoard();
// "HELLO" in row 1 with glowing Yellow pegs
drawWord('HELLO', 1, 6, 'c-yellow');
// "WORLD" in row 7 with glowing Blue pegs
drawWord('WORLD', 7, 6, 'c-blue');
}
// Buttons
document.getElementById('btnReset').addEventListener('click', loadHelloWorld);
document.getElementById('btnClear').addEventListener('click', clearBoard);
// Initial render
loadHelloWorld();
</script>
</body>
</html>
Nothing. This page is entirely self-contained and contacts no other website when it runs.
Published on Globefin under the MIT License. You may copy, change, and reuse this page, including commercially — just keep the notice below with it.
Copyright © 2026 Jacob Curry. Licensed under the MIT License. Published on Globefin.
Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →
Scripts run, but the demo has its own throwaway origin. It can't read your session or cookies, can't reach the page around it, and can't navigate your tab. Don't enter real passwords or personal data into any demo.