FlorianWoelki / obsidian-iconize

Simply add icons to anything you want in Obsidian.
https://florianwoelki.github.io/obsidian-iconize/
MIT License
770 stars 53 forks source link

Add Color to Inline Icons #301

Open FindingJohnny opened 8 months ago

FindingJohnny commented 8 months ago

Is your feature request related to a problem? Please describe. As a note taker, When I am reading notes, I often am frustrated that I cannot quickly determine an icons meaning based on shape alone

Describe the solution you'd like Given I am writing a note, When I add an icon using the obsidian-iconize plugin inline syntax, Then I would like to be able to specify the color

Suggested Syntax:

:<icon-name>|<color>:

<icon-name> is the already defined icon name used when typing icons inline. <color> could be in the form of either color name, hex code color, or css variable / css custom property.

Example - Uses Color Names

# 3D Printing a Custom Coaster for my desk
:LiThumbsDown|red: Print 1 on my 3D Printer failed. Needed to [[calibrate printer]].
:LiThumbsUp|green: Print 2 on my 3D Printer succeed!

Example - Uses Hex Codes

# 3D Printing a Custom Coaster for my desk
:LiThumbsDown|#fa1302: Print 1 on my 3D Printer failed. Needed to [[calibrate printer]].
:LiThumbsUp|#02de40: Print 2 on my 3D Printer succeed!

Example - Uses CSS Variables / CSS Custom Properties

# 3D Printing a Custom Coaster for my desk
:LiThumbsDown|--theme-color-fail: Print 1 on my 3D Printer failed. Needed to [[calibrate printer]].
:LiThumbsUp|--theme-color-success: Print 2 on my 3D Printer succeed!

Describe alternatives you've considered Alternatively, there could be a color picker. However, that seems both more technically challenging to implement and more difficult to use while taking notes.

Additional context As an additional feature, it would be AWESOME if some of the color options could include tooling to help you pick a valid color. Examples listed below.

NOTE: I did my best to describe this suggestion as concisely and accurately as possible. If I can provide more clarity or help brainstorm alternative solutions I would be happy to do so! I'd even be willing to help code the solution if it's something we agree would be a good feature to add! 🙂

simonfossom commented 7 months ago

I was thinking along the same lines but I'd be happy with only settings color for icons (I use them as booksmarks in text)