Back to projects
May 13, 2026
2 min read

RACGP GP Learning Colour Swap

A userscript that swaps the RACGP GP Learning platform's hard-to-read red emphasis text to a high-contrast blue for better legibility.

This userscript runs via Violentmonkey (or any compatible manager) to recolour the hard-to-read red emphasis text (#f00018) on the RACGP GP Learning platform into a high-contrast blue (#0000FF), improving on-screen legibility — particularly on lower-quality displays and for users with red-greed colour blind.

The script reaches inside the shadow DOM of D2L/Brightspace’s <d2l-html-block> custom elements where most lesson content actually lives, and uses a MutationObserver to catch dynamically loaded content as it renders — so red text becomes blue the moment a new lesson, section, or AJAX-loaded page appears. Both the source and replacement colours are configurable in a single line, making the script trivially adaptable to other hex swaps or other D2L-based sites.