| 1 | = Color Macro = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | ColorMacro is a very 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. |
| 6 | |
| 7 | Usage: |
| 8 | {{{ |
| 9 | [[Color( background-color, color , text )]] |
| 10 | }}} |
| 11 | or |
| 12 | {{{ |
| 13 | [[Color( color , text )]] |
| 14 | }}} |
| 15 | Where: |
| 16 | color:: |
| 17 | is a color keyword or hex color number recognised by your browser |
| 18 | text:: |
| 19 | any text or html you like |
| 20 | |
| 21 | |
| 22 | == Bugs/Feature Requests == |
| 23 | |
| 24 | Existing bugs and feature requests for ColorMacro are |
| 25 | [report:9?COMPONENT=ColorMacro here]. |
| 26 | |
| 27 | If you have any issues, create a |
| 28 | [http://trac-hacks.org/newticket?component=ColorMacro&owner=diroussel new ticket]. |
| 29 | |
| 30 | == Download == |
| 31 | |
| 32 | Download the zipped source from [download:colormacro here]. |
| 33 | |
| 34 | == Source == |
| 35 | |
| 36 | You can check out ColorMacro from [http://trac-hacks.org/svn/colormacro here] using Subversion, or [source:colormacro browse the source] with Trac. |
| 37 | |
| 38 | == Example == |
| 39 | |
| 40 | Example: |
| 41 | {{{ |
| 42 | [[Color(red,This has a red background)]] |
| 43 | [[Color(blue, green,This has a blue background and green text)]] |
| 44 | [[Color(none,#bb0000,I'm using a hex color)]] |
| 45 | }}} |
| 46 | |
| 47 | Giving: |
| 48 | {{{ |
| 49 | #!html |
| 50 | <span style="background-color:red;padding: 0.1ex 0.4em;">This has a red background</span> |
| 51 | |
| 52 | <span style="background-color:blue;padding: 0.1ex 0.4em;color: green;">This has a blue background and green text</span> |
| 53 | |
| 54 | <span style="background-color:none;padding: 0.1ex 0.4em;color:#bb0000;">I'm using a hex color</span> |
| 55 | }}} |
| 56 | |
| 57 | == Recent Changes == |
| 58 | |
| 59 | [[ChangeLog(colormacro, 3)]] |
| 60 | |
| 61 | == Author/Contributors == |
| 62 | |
| 63 | '''Author:''' [wiki:diroussel] [[BR]] |
| 64 | '''Contributors:''' |