Function Repository Resource:

RainbowHighlight

Source Notebook

Make your text legendary by dynamically scrolling the colors of the rainbow

Contributed by: Sander Huisman

ResourceFunction["RainbowHighlight"]["text"]

shows the string "text" with moving rainbow colors.

ResourceFunction["RainbowHighlight"]["text",cf]

use the color function cf.

Details

The color function cf can be a function or a string. For the case of a string, ColorData[cf] is used as the color function.

Examples

Basic Examples

In[1]:=
ResourceFunction[
 "RainbowHighlight"]["This is an example of RainbowHighlight"]
Out[1]=

Scope (2) 

Use an arbitrary color function:

In[2]:=
ResourceFunction[
 "RainbowHighlight"]["With some other colors\[Ellipsis]", RGBColor[0.5 + 0.5 Sin[2 Pi #], 0.5 + 0.5 Cos[2 Pi # + 0.4], 0] &]
Out[2]=

Use a named color scheme:

In[3]:=
ResourceFunction[
 "RainbowHighlight"]["With some other colors\[Ellipsis]", "Rainbow"]
Out[3]=

Properties and Relations (1) 

Compare the animated highlighting produced by RainbowHighlight with the static highlighting of the resource function RainbowText:

In[4]:=
Column[{ResourceFunction["RainbowHighlight"][
   "supercalifragilisticexpialidocious"], ResourceFunction["RainbowText"][
   "supercalifragilisticexpialidocious"]}]
Out[4]=

Neat Examples (1) 

Make a bird say a bobbing scrolling rainbow-colored message:

In[5]:=
ResourceFunction["BirdSay"][
 ResourceFunction["Bob"]@
  ResourceFunction["RainbowHighlight"]["This is awesome!", "Rainbow"]]
Out[5]=

Publisher

SHuisman

Version History

  • 1.0.0 – 21 April 2023

Related Resources

License Information