I would be too lazy to check this in the backend
Was the first thing that crossed my mind once I saw this message:
And how would have thought - I’m not the only lazy dev out there. In fact, most devs are lazy.
So if you want a cool custom accent color for your Substack - or on most probably 90% of websites which have such “complex“ validation rules in the frontend, just skip it entirely and see what you can do by calling the API directly.
Just copy and paste this snippet into your browser’s console while you are on your Substack and you’ll have the only acceptable highlight color - black.
fetch(`https://${window.location.hostname}/api/v1/publication`, {
"headers": {
"accept": "/",
"accept-language": "en-US,en;q=1",
"cache-control": "no-cache",
"content-type": "application/json",
"pragma": "no-cache",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin"
},
"referrer": `https://${window.location.hostname}/publish/settings`,
"referrerPolicy": "no-referrer-when-downgrade",
"body": '{"theme_var_background_pop":"#000000"}',
"method": "PUT",
"mode": "cors",
"credentials": "include"
});