I work for a company that provides software for management, in the back end, you can configure the colour schemes to make the pages it creates suit the branding and images better.
Buttons have a gradient applied to them, consisting of a lighter and darker colour, the button CSS is below.
.btn-default {
linear-gradient(to bottom,#9c8400 0%,#5f5000 100%)
}
What I would like to do is take the above gradient and keep the lighter colour the same but change the darker color to white, the lighter color is always the first color in the gradient, and then apply the resulting gradient to the body.
linear-gradient(to bottom,#ffffff 0%,#9c8400 100%);
A previous response provided an answer that almost works but I need to flip the colors (light and dark colours need to be in each other's positions) and change the darker color to white.
const buttonStyle = window.getComputedStyle(button);
console.log(buttonStyle.backgroundImage);
document.body.style.backgroundImage = buttonStyle.backgroundImage;