TextToolboxTextToolbox
HomeText to Visual / EffectsRainbow Text Generator

Rainbow Text Generator

Color whole grapheme clusters with five six-color palettes or a custom palette. Export escaped HTML with background, size and weight, or copy plain text.

Built by Saurabh Kumar

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

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

  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.

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

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

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.

Platform Guides

Using this tool on a specific platform? See our step-by-step guides:

Frequently Asked Questions

Does Copy plain text keep colors?

No. It copies the input string without formatting. Copy HTML also writes a text string: paste that source into an HTML editor that permits inline styles.

How are combined letters and emoji handled?

Intl.Segmenter keeps grapheme clusters together in one span. A browser without this API shows an error. Font rendering and segmentation data can vary by runtime.

Do spaces count in the palette cycle?

Yes. Each grapheme, including whitespace, advances the cycle. Ordinary spaces remain ordinary spaces; white-space: pre-wrap preserves their display. HTML parsing can normalize line endings.

Which settings are included in HTML?

The wrapper includes background, font size, bold weight, generic sans-serif, line height, alignment and wrapping. All five palettes and the six custom colors are available. Receiving editors may remove styles.

What are the limits?

At most 10,000 UTF-16 units and 2,000 grapheme clusters. Invalid colors or unsupported control characters clear output. Input stays available for editing or manual copying; it is not silently truncated.