function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MOHIT KUMAR 319MOHIT KUMAR 319 

How to change standard button background color(New Record)

Hi 
How to change standard button background color(New Record).
SwethaSwetha (Salesforce Developers) 
HI Mohit,
This does not seem to be supported. You will have to go with customization. Thanks
Vinay MVinay M

Hi Mohit,

  If you are referring to changing the lighting-button color which is being used in your code, you can do that by using styling hooks instead of regaulr css. Please refer to an example :

 

HTML:

<lightning-button label="label for button" class="myButton" variant="brand"></lightning-button>

CSS: 

.myButton {
--slds-c-button-brand-color-background : red;  //IF the button variant is "brand"
}

Replace it with " --slds-c-button-neutral-color-background"  if you are using default variant.

Reference :

https://www.lightningdesignsystem.com/components/buttons/

Please mark it as best answer if it solves your issue.

Thank you,

Vinay.