In my HTML code, there is a repetition of using the same, RGB values, in testing, I am changing the colors frequently, so I was hoping there is a way to have the RGB value set or defined somewhere.
I want to stress that, I don't want the ALPHA value set in the RGBA.
For example:
var COLOR = 189,28,50 <br>
...<br>
fill="rgba(COLOR,0.7
A simple answer would be using CSS Custom Properties (Variables) which is very easy and straightforward technique. Declaring a custom property is done using a (custom property name) begins with a double hyphen (--), and then a property value which is any valid CSS value like black, yellow, . Like any other property, this is written inside a ruleset, so it is a set of rules that needs to be written in the style.css file. then step 2 would be defining these custom property inside your :root pseudo-class, so that it can be applied for global usage across your entire html doc. Hope you got the answer. HTML file CSS file
Mozilla Documentation Link: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties