Advertisement:

Author Topic: Highlighting text  (Read 220 times)

Offline Majik_Imaje

  • Semi-Newbie
  • *
  • Posts: 66
Highlighting text
« on: August 12, 2019, 01:30:48 PM »
I downloaded a MOD that allows you to use a magic marker (yellow) in your posts by using the tags  Highlight  text   Highlight

But when using other  colors I don't understand how to format that color using  RGB values

Can anyone translate  this and give me an example?
 
You can use [highlight]Text [/highlight ] to highlight the text between the tags in yellow, or [highlight=(color)]Text[ /highlight ] for any other color.

What is the correct way to format the RGB  inside of () ??



Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,321
  • Master of BBC Abuse
Re: Highlighting text
« Reply #1 on: August 12, 2019, 05:31:18 PM »
Usually it would be done with hex codes (#ffffff for white, #000000 for black, etc) or with colour names, for those which have names.

Try messing around with some of these: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value

Offline Majik_Imaje

  • Semi-Newbie
  • *
  • Posts: 66
Re: Highlighting text
« Reply #2 on: August 13, 2019, 01:34:23 AM »
Aye came up with this.........

Now I am missing something here that is easy, but I can't put my finger on it yet.

i just came from a CSS ( ) site that was talking about how to use RGB values as (0, 255,0)
I tried that but it didn't work. So lets look at the original code   the author used

First the page from CSS ( ) rgb


Now lets look at what the original author wrote:

You can use [highlight]Text[/highlight] to highlight the text between the tags in yellow, or [highlight=(color)]Text[/highlight] for any other color.

First I tried using (blue) (green) and that didn't work
Then after reading the author's suggestion
[highlight=color(0,255,0)]The text is written here[/highlight]

I am using  SMF 2.0.15

The author says this mod is good for 2.1

I can't for the life of me figure out what I am doing wrong.





Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,154
Re: Highlighting text
« Reply #3 on: August 13, 2019, 01:47:26 AM »

[highlight]xxxxxxxxxxxxx[/highlight]
[highlight=green]xxxxxxxxx[/highlight]
[highlight=#0f0]xxxxxxxxx[/highlight]
[highlight=#00ff00]xxxxxxxxx[/highlight]


Offline Majik_Imaje

  • Semi-Newbie
  • *
  • Posts: 66
Re: Highlighting text
« Reply #4 on: August 14, 2019, 12:54:27 AM »
Thank You very much !!  You made my day!!