When an Excel cell referencing other cells is selected, the referenced cells are systematically highlighted with different colours. I would like to imitate and reproduce this effect in JavaScript and CSS.
For instance, in the beginning the background colour of Cell A1
is gray
:
Once we double click on Cell C2
, its referenced cells are highlighted:
We only learn the background colours (and ignore the border colours). A3
now is in purple
; A2
is in purple on top of red
; A1
is in purple on top of red on top of blue on top of gray
.
Does anyone know how this colour effect is called (eg, overlay
, hover
)? Is there a notion of opacity
there? Given the colour code of purple
and red
(and maybe an opacity
number), is there an easy way in JavaScript and CSS to produce the colour of A3?