What Is the Rainbow Text Generator?
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.
How to Use the Rainbow Text Generator
- Enter your text, spaces and line breaks.
- Choose a palette; Custom exposes six individually named color pickers.
- Adjust font size, bold and the background. Use six-digit hex for background values.
- Copy HTML into an HTML editor you control, then inspect the rendered destination. Use Copy plain text when you need only the words.
How the Rainbow Text Generator Works
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.
Rainbow Text Generator Example
| Setting or input | Value or result |
|---|---|
| Input | A B |
| A, index 0 | #FF0000 |
| Space, index 1 | #FF7700, kept as an ordinary space |
| B, index 2 | #FFFF00 |
| e plus combining acute | One colored span containing both code points |
When to Use the Rainbow Text Generator
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.
Common Mistakes
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. Browsers without Intl.Segmenter show an error instead of splitting a joined character.
Tips for Better Results
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.
Technical reference: MDN white-space. See also MDN forced-colors and Clipboard.writeText.