Random Color Generator - HEX, RGB & HSL Colors Online
Random Generators
Generate random colors instantly in HEX, RGB, and HSL formats. Create single colors or full palettes of up to 20 colors with one click.
Click Generate to create a random color.
Generate random colors in HEX, RGB, and HSL
Click Generate to create a random color and instantly see its HEX, RGB, and HSL representations. Switch to Palette mode to generate up to 20 colors at once, great for brainstorming a color scheme or picking an accent color.
How colors are generated
Each color is created by generating three independent random byte values (0–255) for red, green, and blue using your browser's Web Crypto API. The RGB values are then converted to HEX and HSL. Because every byte combination is equally likely, you'll see the full spectrum including pastels, vivid hues, and near-black or near-white shades.
Color format quick reference
HEX: The most common format for web design. A 6-digit base-16 string like
#ff6b35 where each pair of digits encodes red, green, and blue (00–ff).
RGB: Specifies each channel as a decimal number from 0 to 255, e.g.
rgb(255, 107, 53). Used directly in CSS and canvas drawing.
HSL: Hue (0–360°), Saturation (0–100%), Lightness (0–100%). More intuitive
for adjusting colors programmatically: changing lightness makes a color lighter or darker
without shifting the hue.
When to use random colors
Random color generators are handy for placeholder UI elements, generating test data with distinct visual identities, seeding a design mood board, or simply finding unexpected color combinations you wouldn't have chosen consciously. Copy a value and paste it directly into your CSS, design tool, or code editor.
Constrained generation
When you need colors within a specific range rather than fully random, work in HSL space:
- Pastels: high lightness (70–90%) and moderate saturation (30–60%).
- Warm tones: hue constrained to 0–60° (reds, oranges, yellows).
- Cool tones: hue constrained to 180–270° (cyans, blues, purples).
- Vivid / saturated: saturation > 70%, lightness near 50%.
Color harmony
When generating a palette, these relationships create visually balanced schemes:
- Complementary: two hues directly opposite on the color wheel (180° apart). High contrast; use one as dominant and the other as accent.
- Analogous: three or four hues adjacent on the wheel (±30°). Naturally harmonious; common in nature-inspired palettes.
- Triadic: three hues evenly spaced at 120° intervals. Vibrant and balanced; often used in bold graphic design.
- Split-complementary: a base hue plus the two hues adjacent to its complement. More nuanced than complementary with less tension.
More random generators
- Bingo Card GeneratorGenerate random 5×5 BINGO cards instantly. Mark numbers as they are called, with automatic win detection for rows, columns, and diagonals.
- Coin FlipperFlip one coin or up to 10 at once. Tracks session stats (heads/tails %) and full history. Optional weighted coin for probability experiments. All randomness uses Web Crypto.
- Decision WheelEnter your options and spin the wheel to get a random pick. Great for making decisions, choosing winners, or settling debates. Runs entirely in your browser.
- Dice RollerRoll d4, d6, d8, d10, d12, d20, d100 or any custom die. Full D&D dice notation: 4d6kh3, 2d20kl1, 3d8! and more. Per-die results, totals, history. All randomness via Web Crypto.
- Lottery NumbersGenerate random lottery numbers for Powerball, Mega Millions, EuroMillions, or a custom game. All picks use your browser's crypto API.
- Magic 8-BallAsk the classic Magic 8-Ball any yes/no question and receive one of 20 authentic responses. All decisions are final.