If you’re looking to add multiple colors or tones or swap the layer opacity of your icons, you’ve come to the right place. Who doesn’t love a winning flavor combination?
Advertisement
Remove ads with a Pro plan!
A subscription to a Pro-level plan will remove all third-party advertisements on fontawesome.com.
And of course Pro-level plans come with…
All 30,013 icons in Font Awesome
5 Classic styles of every icon
4 Sharp styles of every icon
A Perpetual License to use Pro
Services and tools to make easy work of using icons
Our duotone style works just like all of our other icons but with two distinct shades of color. Duotone is a great effect when you’re looking to add more of your brand or an illustrative quality to the icons in your project.
Pro
Plan Required
Pro Plan Required!
This is a Pro feature so you'll need to
grab a Pro-level plan
to use it. You'll also get thousands more icons, access to services, and support! Already got a plan?
Sign in!
Duotone icons use the same syntax Font Awesome icons, and you can reference them like any other icon using their specific style prefix (fa-duotone). They will inherit whatever color is around them, with the secondary layer being a transparent version of the primary color.
<divclass="fa-3x"><iclass="fa-duotone fa-camera"></i><!-- a duotone style camera icon --><iclass="fa-duotone fa-fire-alt"></i><!-- a duotone style fire-alt icon --><iclass="fa-duotone fa-bus-alt"></i><!-- a duotone style bus-alt icon --><iclass="fa-duotone fa-fill-drip"></i><!-- a duotone style fill-drip icon --></div>
Swapping Layer Opacity
Advertisement
Remove ads with a Pro plan!
A subscription to a Pro-level plan will remove all third-party advertisements on fontawesome.com.
And of course Pro-level plans come with…
All 30,013 icons in Font Awesome
5 Classic styles of every icon
4 Sharp styles of every icon
A Perpetual License to use Pro
Services and tools to make easy work of using icons
You can swap the default opacity of each duotone icon's layers. This will make an icon's primary layer have the default opacity of 40% rather than its secondary layer.
<divclass="fa-3x"><iclass="fa-duotone fa-camera"></i><!-- a duotone style camera icon --><iclass="fa-duotone fa-camera fa-swap-opacity"></i><!-- a duotone style camera icon with swapped opacity --><iclass="fa-duotone fa-fire-alt"></i><!-- a duotone style fire-alt icon --><iclass="fa-duotone fa-fire-alt fa-swap-opacity"></i><!-- a duotone style fire-alt icon with swapped opacity --><iclass="fa-duotone fa-bus-alt"></i><!-- a duotone style bus-alt icon --><iclass="fa-duotone fa-bus-alt fa-swap-opacity"></i><!-- a duotone style bus-alt icon with swapped opacity --></div>
By default, the secondary layer in a duotone icon is set to 40% opacity (via an opacity 0.4; rule in Font Awesome's support CSS). You can explicitly set the opacity of a duotone icon's layer by using the CSS custom properties(opens new window) below. New to custom properties? Here are some recommendations on using them in a project.
Properties
CSS Custom Property
Accepted Values
Set Primary Layer Opacity
--fa-primary-opacity
01.0
Set Secondary Layer Opacity
--fa-secondary-opacity
01.0
<divclass="fa-3x"><iclass="fa-duotone fa-bus-alt"style="--fa-secondary-opacity: 0.20"></i><!-- secondary layer's opacity set to 20% --><iclass="fa-duotone fa-bus-alt"style="--fa-secondary-opacity: 0.40"></i><!-- secondary layer's opacity set to 40% --><iclass="fa-duotone fa-bus-alt"style="--fa-secondary-opacity: 0.60"></i><!-- secondary layer's opacity set to 60% --><iclass="fa-duotone fa-bus-alt"style="--fa-secondary-opacity: 0.80"></i><!-- secondary layer's opacity set to 80% --><iclass="fa-duotone fa-bus-alt"style="--fa-secondary-opacity: 1.0"></i><!-- secondary layer's opacity set to 100% --></div>
<divclass="fa-3x"><iclass="fa-duotone fa-bus-alt"style="--fa-primary-opacity: 0.20"></i><!-- primary layer's opacity set to 20% --><iclass="fa-duotone fa-bus-alt"style="--fa-primary-opacity: 0.40"></i><!-- primary layer's opacity set to 40% --><iclass="fa-duotone fa-bus-alt"style="--fa-primary-opacity: 0.60"></i><!-- primary layer's opacity set to 60% --><iclass="fa-duotone fa-bus-alt"style="--fa-primary-opacity: 0.80"></i><!-- primary layer's opacity set to 80% --><iclass="fa-duotone fa-bus-alt"style="--fa-primary-opacity: 1.0"></i><!-- primary layer's opacity set to 100% --></div>
Like all other Font Awesome icons, duotone icons automatically inherit CSS size and color. A duotone icon consists of a primary and secondary layer. By default, The secondary layer is given an opacity of 40% so that it appears as a lighter shade of the icon's inherited or directly set color.
<divclass="fa-3x"><iclass="fa-duotone fa-bus-alt"style="--fa-primary-color: gold;"></i><!-- primary layer color defined --><iclass="fa-duotone fa-bus-alt"style="--fa-primary-color: orangered;"></i><!-- primary layer color defined --><iclass="fa-duotone fa-fill-drip"style="--fa-secondary-color: limegreen;"></i><!-- secondary layer color defined --><iclass="fa-duotone fa-fill-drip"style="--fa-secondary-color: rebeccapurple;"></i><!-- secondary layer color defined --><iclass="fa-duotone fa-battery-full"style="--fa-primary-color: limegreen;--fa-secondary-color: dimgray;"></i><!-- secondary + primary layer color defined --><iclass="fa-duotone fa-battery-quarter"style="--fa-primary-color: orange;--fa-secondary-color: dimgray;"></i><!-- secondary + primary layer color defined --></div>
When you combine all of the coloring, opacity, and other options together, Font Awesome icons get even more awesome. Here are a few ideas on how duotone icons can take your project to the next level.
Use Color to Highlight a Part of an Icon or to Note Status
Ready for "Advanced Defense Against the Dark Arts" and Duotone Icon Use? Here are some advanced examples you can start from to cast some real duotone magic. Want to ace those upcoming O.W.L.s on theming? Check out even more examples.
Using in a Project
Advertisement
Remove ads with a Pro plan!
A subscription to a Pro-level plan will remove all third-party advertisements on fontawesome.com.
And of course Pro-level plans come with…
All 30,013 icons in Font Awesome
5 Classic styles of every icon
4 Sharp styles of every icon
A Perpetual License to use Pro
Services and tools to make easy work of using icons
Because duotone icons are made up of two layers with different color values, they can be more like illustrations than other Font Awesome styles and need extra care for accessibility.
Since they are more complex visually, duotone icons may be harder to read at smaller sizes. In addition to that, the colors and opacity you choose for each icon's layers can also affect their legibility. Some tips for improving legibility and accessibility:
Render duotone style icons at larger sizes (2x your base type size is a good starting point).
Swap the default opacity of each layer in a duotone icon (making an icon's primary layer have the default opacity of 40% rather than its secondary layer)
Can I use Duotone Icons by using CSS pseudo-elements?
Yes, the duotone icon style can be used alongside CSS pseudo-elements. Doing so is even more complicated than the base difficulty of rendering icons with CSS pseudo-elements. It's recommended only for those who can't control the final markup of their site/project as well as ninjas who want complete control over their markup.
Doh! The icon I want to use isn't showing up in duotone style!
Let's double-check a few things.
Are you using the duotone-specific fa-duotone style prefix?
Duotone icons are only available with Font Awesome Pro — make sure you have an active Pro-level plan or a Pro license with access to Version 5.10.0 or greater.
We release icons pretty frequently these days. Make sure you’re using the latest and greatest version, so any new icons you want to use are at your fingertips.
If you’ve decided to host your own copy of Font Awesome, check that you’ve moved all of the files you need to use the icon you want. Also, double-check the paths to those files in your HTML’s <head>.
Help! I can't target individual layers!
Make sure you're using the correct custom property values. Also, make sure you haven't defined a custom property that may be overriding things (check inline and in your custom CSS). We don't recommend writing custom CSS to target a specific class or pseudo-element — there are some differences between our Web Fonts and SVG versions of Font Awesome that can make this tricky.
Can I use other Font Awesome styling alongside duotone icons
Duotone icons render great in all modern web browsers. Since Internet Explorer versions 10 and 11 do not support CSS Custom properties, duotone icons will still render in that browser but you won't be able to define colors or opacity for individual layers. If you must support that outdated browser, we recommend defining the color on the icon or its parent element instead.