A Chrome extension which changes the hue of words on any website to match the name of a color. For example, if the word "blue" is on a website, the extension will recolor the word to literally be blue. 🧑🎨 Install the extension!
This is an excerpt from the rainbow page of Wikipedia:
But if you install the extension, you should be viewing a radical improvement to your quality of life:
Black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, and aqua.
- Navigate to
chrome://extensions/
- Enable "Developer Mode"
- Load Unpacked
- Open local folder that contains manifest.json
Written using Mark.js for search and highlighting functionality, the extension also runs a contrast ratio check to determine if a text-shadow should be applied.
- forEach() loop isn't necessary generally speaking, but is used here to allow for RegExp parsing to accomodate plural forms
- Seperate very common colors from less common colors, placing them in seperate arrays. Then, hit these arrays one after the other, allowing Mark.js to run on each. This will provide a good user experience to most people while preserving a fun bonus for folks encountering uncommon colors.