In part two of this series we looked at how to choose a Font Awesome icon.
In this post, we will be looking at how to use colours with Font Awesome icons.
More than one way
Please bear in mind if you already know about HTML colours and CSS and so on, you will probably be screaming right now “Don’t use inline formatting!”.
But we are approaching this series in a basic way, to help ordinary Moodle teachers use Font Awesome – perhaps for just a few in-course icons.
You can find many, many websites to help you choose colours, and I suggest you stick to web safe colours.
You can probably guess the main colour names to use such as Black, Blue, Green, Gold, Olive, Plum, and so on.
But this site (as well as many others you can find) lists the names you probably wouldn’t guess such as SlateBlue, PaleGreen, MistyRose, LightSalmon, and many others.
If you think back to part two of this series, you will remember we can add a Font Awesome icon like this:
<i class="fa fa-camera-retro fa-3x"></i>
Adding colour is as easy as adding an extra statement – see the bold text below that adds the colour statement:
<i class="fa fa-camera-retro fa-3x" style="color:MidnightBlue"></i>
<i class="fa fa-camera-retro fa-3x" style="color:Tomato"></i>
Do note the Americanised spelling of color, and not the English spelling of colour.
Hexadecimal codes can also be used. They are not as user friendly, but ‘real’ web designers and HTML writers will tend to use these.
So for example, Teal has a Hex value of #008080
<i class="fa fa-camera-retro fa-3x" style="color:#008080"></i>
And Maroon has a Hex value of #800000
<i class="fa fa-camera-retro fa-3x" style="color:#800000"></i>
So, now you can colour your icons any way you want 🙂
All good ?
OK, so your task before my next Font Awesome post is to see if you can add some Font Awesome icons to your course, and match your Moodle site colour scheme (or the colour scheme of your course) … good luck !
See the full collection of articles on using Font Awesome with Moodle within this dedicated (open and free) Moodle course on our ElearningWorld Academy.
Latest posts by Stuart Mealor (see all)
- Using an iPad for real, part 3 – Apps – 14th September 2019
- Moodle plugin of the month – Buttons course format – 12th September 2019
- Linux for new users part 4 – dates – 9th September 2019