I updated the code above. The most you can set transparency to is 90 AFAIK.
If you really want to only see the magenta items, the visibility property could be toggled
Thanks ronjonp for the update
There were some issues I encounter.
- unfoo did not revert the view
- All text attributes that is not magenta did not go transparent.
- dimension and/or dimension text override with magenta became faded (which should not since it is magenta)
- mtext format override with magenta became faded (which should not since it is magenta)
- please add colour 2 (yellow) as well