Customising the Client Portal Colour In Invoiceninja 5

Invoiceninja logo

In V5, the client portal has gone though a major redesign which improves on just about everything that was available in V4.

By default, the primary colour is blue and you may want to change it to match your own brand colours, but this is easy to customise.

Graphical user interface, application
Default Colours

If we inspect the css we can see that the colours are set using css variables.

Graphical user interface, text
Graphical user interface, text, application

This makes it easy to override the whole theme by just overriding that one variable.

For example, if we wanted to change the primary colour to purple, we might add something like this: 

:root {
    --primary-color: #800080;
}

If you tried adding that to Settings > Client Portal > Customize > Custom CSS though, you would see that it's not specific enough.

Graphical user interface, text, application
Graphical user interface, application

To make this more specific and override the original value we can double up the :root selector like this:

:root:root {
    --primary-color: #800080;
}

And then we have a purple portal!

Invoiceninja V5 client portal using a custom colour
Purple Portal!