Author Topic: Add Color to Clickable URLs  (Read 507 times)

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
Steven enabled Clickable URLs in early 2022. I now want the URL to appear in color.

The custom tag is called <Link 1> and it is set as a URL. In the Track Information panel I have <Link 1" which works (is clickable.) Changing it to this and it is no longer clickable:
Code
{color: 200,0,0}<Link 1>

Is it possible to have the link appear in color? Is so, how?

For reference to original Wishlist thread see this.

Thanks.

EDIT: Included link original thread
Last Edit: March 20, 2025, 07:55:54 PM by phred
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

tjinc

  • Sr. Member
  • ****
  • Posts: 830
Not sure why that doesn't work but it seems it can be done using a virtual tag (configured as URL) with the exact same code and then displaying this virtual tag instead.
Last Edit: March 21, 2025, 01:48:18 PM by tjinc

voodoopunk

  • Full Member
  • ***
  • Posts: 212
Not sure why that doesn't work but it seems it can be done using a virtual tag (configured as URL) with the exact same code and then displaying this virtual tag instead.
Strange!
Are you sure?

Show me please.

EDIT: I'm sure I read somewhere that no formatting was possible, where exactly I don't recall and can't find it.
Black Flag - The First Four Years

tjinc

  • Sr. Member
  • ****
  • Posts: 830
Not sure what you want me to show you so:

Track Info Panel:

The default <Link> field (white) works as expected.
The formatted <Link> field (red) does not work (as Phred has stated).
The Virtual2 field (blue) works as a link.

and its configuration:


Virtual2 code:
Code
{color: 50,100,250}{contrast: 60}<Link>

voodoopunk

  • Full Member
  • ***
  • Posts: 212
Strange, I can't get a virtual tag set like that to be clickable.
Black Flag - The First Four Years

tjinc

  • Sr. Member
  • ****
  • Posts: 830
Have you configured the Virtual tag field as 'URL'?

voodoopunk

  • Full Member
  • ***
  • Posts: 212
That's what it was, didn't even know that was a thing.

Thanks for your help tjinc.
Black Flag - The First Four Years

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
Virtual2 code:
Code
{color: 50,100,250}{contrast: 60}<Link>
Thanks tjinc. Apparently my mistake was that I was using a Custom Tag instead of a Virtual Tag. HOWEVER, now that I've removed the Custom and created a Virtual, the URL is clickable, but there still is no color. I copied your Virtual Tag exactly with the change from "Link" to "Link 1" and pasted it into Virtual 14 with the Type as URL.
Code
{color: 50,100,250}{contrast: 60}<Link 1>


Then I added it to the Track Details Template Editor

And it's clickable. Perhaps it's blue, but I think it's still black.

I removed the contrast part of the Virtual Tag and changed the color to 200.0.0 (red) removed it from the Track Info and added the changed tag from the drop-down and it shows as "Invalid naming template -- {color: 200,0,0}<Link 1>"


So for the time being, I'm using your template for the Virtual Tag even though it's not in color.

Suggestions?
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

tjinc

  • Sr. Member
  • ****
  • Posts: 830
phred - you seem to have gotten into a bit of a muddle here:

You still need your Custom tag <Link 1> to store the details of the link - this should not be changed. The virtual tag will be used to modify the appearance of this data.

But it looks like you have added the virtual tag formula into the 'Override Label':

You'll be wanting to reset these to Virtual14 and Virtual15 for the time being.

The code needs to go in the formula box of the New Tag Definition window (and perhaps change the label here to 'Link 1 Color' so it is easy to find):


Then add the field <Link 1 Color> to your Track Details panel

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
phred - you seem to have gotten into a bit of a muddle here:
No shite.  :-)

Quote
The code needs to go in the formula box of the New Tag Definition window (and perhaps change the label here to 'Link 1 Color' so it is easy to find):
[...
Then add the field <Link 1 Color> to your Track Details panel
That's what I failed to do. The few Virtual Tags that I've created in the past where -way- in the past. Obviously I forgot some of the steps.

Thanks for getting this straightened out.

Now --- I'm pretty sure the color codes used for this are not RGB. Are they HEX? What format are they so I can find an online list of color codes and experiment with what works best on my theme.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

tjinc

  • Sr. Member
  • ****
  • Posts: 830
Glad you have it working now.

I believe that this is RGB colour coding here (HEX would be of the form '#C80000')

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
Glad you have it working now.

I believe that this is RGB colour coding here (HEX would be of the form '#C80000')
Yes, I'm also glad it's working. Appreciate your help.

Great. I'll play around with RGB and see where I wind up.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here