Cadmium is used in cadmium sulfide, which is a bright yellow pigment. When cadmium sulfide is mixed with selenium, it creates a range of colors from yellow to red, including the reddish-orange color used in electrical writing. This mixture is used in electrical marking pens because it has good electrical conductivity.
Let me know if you have any other questions!