IconRules
✖
IconRules
✖
is an option for CloudObject and related objects that specifies icons to use in different environments to represent an object.
Details

- The setting for IconRules can be the following:
-
image a single image to be resized for all icons {image1,image2,…} images where an appropriate size is used for all icons {"env1"image,…} separate settings for different environments - Possible environments include:
-
"Android" icon to display under Android "FileBrowser" icon to display in the file browser "IOS" icon to display under iOS "WebPage" favicon for a webpage All generic icon to use - The setting for each environment is of the form "env"->image or "env"->{image1,image2,…}.
- When an icon of a particular size is required, the immediately larger imagei is selected and scaled down to the required size.
- Each image can be an explicit Image object, Graphics, or any other expression, which if necessary will be rasterized.
- A setting of Automatic for IconRules or for a particular element will generate an icon automatically from the contents of the cloud object.
- If a particular element is needed that has not been specified explicitly, it will be interpolated from other elements given.
- The setting for IconRules for a cloud object can be changed using SetOptions.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (2)Survey of the scope of standard use cases
Create a cloud object that shows the current time, with a representative icon:
In[1]:=1

✖
https://wolfram.com/xid/0bdpkh99e-fv0nos
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0bdpkh99e-4onn2
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0bdpkh99e-d8v8e2
Out[3]=3

Expressions without graphics also get automatic icons:
In[1]:=1

✖
https://wolfram.com/xid/0bdpkh99e-cvn7wk
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0bdpkh99e-sj0ry
Out[2]=2

Wolfram Research (2014), IconRules, Wolfram Language function, https://reference.wolfram.com/language/ref/IconRules.html.
✖
Wolfram Research (2014), IconRules, Wolfram Language function, https://reference.wolfram.com/language/ref/IconRules.html.
Text
Wolfram Research (2014), IconRules, Wolfram Language function, https://reference.wolfram.com/language/ref/IconRules.html.
✖
Wolfram Research (2014), IconRules, Wolfram Language function, https://reference.wolfram.com/language/ref/IconRules.html.
CMS
Wolfram Language. 2014. "IconRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/IconRules.html.
✖
Wolfram Language. 2014. "IconRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/IconRules.html.
APA
Wolfram Language. (2014). IconRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IconRules.html
✖
Wolfram Language. (2014). IconRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IconRules.html
BibTeX
✖
@misc{reference.wolfram_2025_iconrules, author="Wolfram Research", title="{IconRules}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/IconRules.html}", note=[Accessed: 25-May-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_iconrules, organization={Wolfram Research}, title={IconRules}, year={2014}, url={https://reference.wolfram.com/language/ref/IconRules.html}, note=[Accessed: 25-May-2025
]}