TextToolbox
HomeRainbow Text Generator

Rainbow Text Generator

Color your text in rainbow colors, choosing one of five palettes or your own. Copy it as HTML with the colors, or as plain text.

Quick Answer

Rainbow Text assigns a six-color cycle to grapheme clusters, including spaces and line breaks. Copy HTML exports escaped source with colored spans and selected layout settings. Copy plain text exports only the input. No ANSI, Minecraft, Roblox or image output is generated.

Copy plain text keeps only your words. CSS/HTML code must be applied in an editor that supports it. Limit: 10,000 UTF-16 units and 2,000 grapheme clusters.

Rainbow Text Settings

Live Preview

Rainbow Text

HTML Output

Six-Color Palettes and HTML Export

Type some text, pick a color palette and see it in rainbow colors. You can copy the result as HTML to use on a web page. Apply a repeating six-color palette to text and export HTML source. Choose Rainbow, Pastel, Neon, Warm, Cool or six custom colors. Copy HTML produces an escaped div with colored spans and selected background, size and weight. Copy plain text carries no color. The HTML is copied as a source string, not rich clipboard content.

Colors for the text A B

Default settings and exact example values
Setting or inputValue or result
InputA B
A, index 0#FF0000
Space, index 1#FF7700, kept as an ordinary space
B, index 2#FFFF00
e plus combining acuteOne colored span containing both code points

From text to HTML in four steps

  1. Enter your text, spaces and line breaks.
  2. Choose a palette; Custom exposes six individually named color pickers.
  3. Adjust font size, bold and the background. Use six-digit hex for background values.
  4. Copy HTML into an HTML editor you control, then inspect the rendered destination. Use Copy plain text when you need only the words.

Ways to use the HTML:

  • Web callout: Insert HTML source in a page editor that permits inline styles.
  • Palette selection: Compare the five palettes against your intended background.
  • Unicode label: Keep a combined letter together when coloring a short heading.

How colors are assigned to letters

Intl.Segmenter groups grapheme clusters before assigning colors. A combined letter or joined emoji stays in a single span. Spaces and line breaks also occupy palette positions; the sequence does not restart on each line. The wrapper uses white-space: pre-wrap. HTML special characters are escaped, so your text cannot become tags. Browser segmentation and HTML newline normalization can differ from the source string, and font rendering and segmentation data can vary by runtime. The wrapper also carries a generic sans-serif font, line height, alignment and wrapping.

Why the colors disappear after pasting

HTML pasted into a plain-text field stays code; plain-text Copy cannot carry these colors. An editor may sanitize inline styles, and email or receiving-app rendering has not been tested here. Invalid hex, unsupported Unicode or input above the limits clears the generated result; your input stays available for editing or manual copying and is never silently truncated. Browsers without Intl.Segmenter show an error instead of splitting a joined character.

Readability and limits

Use short display text and test each palette color against the background. Yellow on white can be difficult to read. Do not use alternating colors as the only way to communicate a status. The bounds are 10,000 UTF-16 units and 2,000 grapheme clusters, including whitespace. Reset restores the default custom palette too.

This tool exports neither Roblox RichText markup nor Minecraft plugin chat formats.

Technical reference: MDN white-space. See also MDN Clipboard.writeText, which the Copy buttons use.