I want to change all buttons color whose color is blue to red

According to my company theme I want to change blue buttons to red buttons. Any recommendation regarding this customization?

Hope this will help

1 Like

@Salmanmulani Thanks for your reply but It will change the colors of custom buttons but I want to change the all buttons which are used in ERPNext with blue color. I think you will understand my point of view…

I can understand if there any solution I found will update you

1 Like


Change the color of btn-primary class in desk.min.css


desk.min.css file is auto generated file which is regenerated every time if I change any thing so the change will not be apply…Any solution to edit this file I found this file on sites/assets/css/desk.min.css this path… Guide me if I wrong…dear @shahid

It don’t think so that it will auto regenerate every time, and what do you mean by every time? on every update or what?
I have also changed my theme by editing desk.min.css.

You may check this detail…

You can make a custom app, then add a custom css file to its public folder. E.g…


.btn-primary {
    background-color: red;

Then include that file in custom_app/custom_app/hooks.py

app_include_css = [

Then run bench build


Can you clarify me where to make exactly custom_app
give a clarity on this.

Using the below commands:

bench new-app application_name
bench install-app application_name


Ok thank you.

Did it work?

1 Like

I tried this, but I am not able to have /home/user/frappe-bench/sites/assets/css/desk.min.css updated even after bench build.

I have followed your steps exactly.

Placed the custom.css in /home/user/frappe-bench/apps/custom_app/custom_app/public/css/custom.css

Also created a symbolic link in /home/user/frappe-bench/sites/assets but no difference.

Some understanding on what is the process that takes place to build up desk.min.css and the hierarchy it follows is lacking.

Finally sorted out. Need to create build.json as well. So let me write here how it worked:


app_include_css = [

custom.css in bench/apps/custom_app/custom_app/public/css

.btn-primary {
    background-color: crimson;
    border-color: crimson;

build.json in bench/apps/custom_app/custom_app/public

    "css/custom.min.css": [

I need to change the color of the blue buttons to green, the blue ones carry the btn-primary class but I still haven’t managed to change the color.
I need help

try it, it worked for me.
$(“[data-fieldname=general_tab]”).css(‘background-color’, ‘lightblue’);

Can you tell me where exactly I change it?
My goal is to change the color of all the blue buttons to green


1 Like