Accessing (and using) information about a Shortcut

In this post I contemplated the idea of organizing Shortcuts based on color. After discusssion in that post, I gave up on the idea.

However, after learning a bit more about the Set Name action I decided to go back to my original idea. Thankfully, the correct use of Set Name solved my problem.

This Shortcut parses and displays information about the chosen shortcut:

  • Create and Edit Dates
  • Glyph
  • Icon Color
  • Widget (yes/no)
  • Share Sheet enabled (yes/no). If yes, the content types are listed

With this, the Shortcut color (and other attributes) is now actionable. I can use the discrete value to produce a list of Shortcuts of a certain color.

https://www.icloud.com/shortcuts/e8e5ec2c72d246c486622a73106e8fac

— jay

3 Likes

Nice work :clap:t3::clap:t3:

I started something similar, but decided to go in another direction. But, just in case it gives you some idea for your shortcut, here it is:
https://www.icloud.com/shortcuts/fd77c4c769984332a296f9f5f5213144

Copy the URL of a shortcut and run mine to see what it does with the shortcut information.

In case you haven’t noticed, the color number, when viewed as an hexadecimal number, has the format RRGGBBFF (the usual RGB format plus an FF meaning “fully opaque”). Unfortunately I haven’t found a comprehensive list of glyphs and numbers.

1 Like

While I question the true utility of this shortcut I thought I would go ahead and share. Perhaps it will be useful for somebody else…

The shortcut allows you to choose a category (eg, Music, Work, etc) and then select and run a shortcut chosen from the shortcuts organized within that category.

The shortcut assumes Shortcuts are organized by colors that are meaningful (eg, Light Blue = all Music related shortcuts; Purple = all Work related shortcuts, etc)

Setup

The shortcut is dependent on a dictionary that maps colors to categories. That dictionary is setup in this shortcut:

https://www.icloud.com/shortcuts/27782f8505214436bea8463c0c6fac42

You’ll note logic within the shortcut to flip the keys. The shortcut produces a dictionary formatted as either category=color or color=category. I only want to maintain one list of categories, but needed it in both key-value formats. Thus, this added logic. The one setup step is to edit the table to define your own category color equivalents.


This is the main shortcut:
https://www.icloud.com/shortcuts/603b4aafd9bd4aaf9caf467daaba091f

For “simplicity” I broke it into 3 sub-shortcuts:

  1. Create a sorted list of all shortcuts. Each shortcut is represented by a pair: category_name|shortcut_title
    https://www.icloud.com/shortcuts/aa0278a6555c4266b4cb0ab39c528573

  2. Create a dictionary keyed by category. The children of each category node are all of the shortcuts within that category
    https://www.icloud.com/shortcuts/3de572d30ac84e3daad325585422696e

  3. Prompt for category and then prompt for and run the shortcut within the chosen category
    https://www.icloud.com/shortcuts/135a298962c6453cbfe0bbe95cbc4e4e


The following is my reference table of color codes and the corresponding icon color

4282601983 1 Red
4251333119 2 Orange Red
4271458815 3 Orange
4274264319 4 Yellow
4292093695 5 Green
431817727 6 Turquoise
1440408063 7 Baby Blue
463140863 8 Blue
946986751 9 Midnight Blue
2071128575 10 Purple
3679049983 11 Lavender
3980825855 12 Pink
255 13 Dark Gray
3031607807 14 Gray
2846468607 15 Ash
2 Likes

I’m intrigued as to why these colour codes aren’t in hex.

Not useful for colour organisation, (i did something similar with Glyph numbers as I find colours too confusing for organising) but interestingly you can also pull this sort of information from a shared icloud link without installing the shortcut.