Changes between Version 26 and Version 27 of ColorMacro
- Timestamp:
- May 16, 2015, 7:45:31 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ColorMacro
v26 v27 5 5 == Description 6 6 7 ColorMacrois a simple macro that allows you to change the background color of a piece of text. Useful for highlighting, or RAG (red, amber, green) status reports.7 This is a simple macro that allows you to change the background color of a piece of text. Useful for highlighting, or RAG (red, amber, green) status reports. 8 8 9 9 Usage: … … 11 11 [[Color( background-color, color , text )]] 12 12 }}} 13 or 13 or: 14 14 {{{ 15 15 [[Color( color , text )]] 16 16 }}} 17 17 18 Where '''color''' is a color keyword or hex color number recognised by your browser and '''text''' is your text. 18 Where '''color''' is a color keyword or hex color number recognised by your browser and '''text''' is your text. Commas are allowed, but '(' and ')' cause a problem. 19 19 20 '''Note''': This could also be a rchieved out-of-the-box in Trac (>=0.11.8 or so) by span macro (see [http://trac.edgewall.org/wiki/WikiHtml#HowtoUseDivSpan WikiHtml] for Details). Example usage of span macro:20 '''Note''': This could also be achieved out-of-the-box in Trac (>=0.11.8) by span macro, see [http://trac.edgewall.org/wiki/WikiHtml#HowtoUseDivSpan WikiHtml] for details. Example usage of span macro: 21 21 {{{ 22 22 [[span(''WORLD'', style=color: green)]] … … 30 30 If you have any issues, create a 31 31 [http://trac-hacks.org/newticket?component=ColorMacro&owner=diroussel new ticket]. 32 33 [[TicketQuery(component=ColorMacro&group=type,format=progress)]] 32 34 33 35 == Download … … 43 45 Example: 44 46 {{{ 45 [[Color(red, This has a red background)]]46 [[Color( blue, green,This has ablue background and green text)]]47 [[Color(none, #bb0000,I'm using a hex color)]]47 [[Color(red, This has a red background)]] 48 [[Color(lightblue, green, This has a lightblue background and green text)]] 49 [[Color(none, #0000bb, I'm using a hex color)]] 48 50 }}} 49 51 50 52 which would then render as: 51 {{{ 52 #!html 53 {{{#!html 53 54 <span style="background-color:red;padding: 0.1ex 0.4em;">This has a red background</span> 54 55 }}} 55 56 [[BR]] 56 {{{ 57 #!html 58 <span style="background-color:blue;color:green;padding: 0.1ex 0.4em;">This has a blue background and green text</span> 57 {{{#!html 58 <span style="background-color:lightblue;color:green;padding: 0.1ex 0.4em;">This has a lightblue background and green text</span> 59 59 }}} 60 60 [[BR]] 61 {{{ 62 #!html 63 <span style="color:#bb0000;padding: 0.1ex 0.4em;">I'm using a hex color</span> 64 }}} 65 [[BR]] 61 {{{#!html 62 <span style="color:#0000bb;padding: 0.1ex 0.4em;">I'm using a hex color</span> 63 }}} 66 64 67 65 == Recent Changes