Multi-language grammar highlighter for the browser. Real-time morphological analysis that color-codes particles, verb forms, adjectives, and grammar structures โ right on any webpage.
NihongoColor is a Chrome Extension (Manifest V3) that performs real-time grammar highlighting on any webpage. Instead of modifying the DOM, it uses the native CSS Custom Highlight API for zero-impact rendering โ fully compatible with SPAs, Google Translate, and dynamic content.
For Japanese, it uses Kuromoji.js for morphological analysis (tokenization + POS tagging). For Korean and Chinese, it uses pattern-based regex matching. New languages can be added by simply dropping a JSON file โ no code changes needed.
Hover over any highlighted word to see a tooltip explaining its grammatical function in your preferred language (English, Portuguese, Japanese, Korean, or Chinese).
- ๐จ Full UI Customization: Open the extension popup to instantly toggle grammar categories on/off or change their colors using the built-in color picker. Your preferences are saved automatically!
- ๐ง Subject-Object-Verb (SOV) Engine: A revolutionary dual-layer parser! While grammatical particles have their text colored, their corresponding Subject, Object, and Verb clauses receive an elegant background highlight + colored border for deeper syntactical understanding.
- ๐ฌ Instant Subtitle Sync (Netflix & YouTube): The engine detects when you are watching a video (YouTube, Netflix, Crunchyroll, Prime Video, etc.) and drops the internal analysis latency to 10ms. Grammars are highlighted instantly the moment a subtitle appears on screen!
nihongo-color/
โโโ languages/ # ๐๏ธ Scalable language database
โ โโโ registry.json # Central index of all languages
โ โโโ japanese.json # Full pack: particles, verbs, adjectives
โ โโโ korean.json # Korean particles + regex rules
โ โโโ chinese.json # Chinese grammar patterns
โโโ lang-loader.js # Loads registry + packs โ compiled tables
โโโ content.js # Dual-engine highlighter (Kuromoji + Regex)
โโโ popup.html / popup.js # Multi-language popup UI
โโโ manifest.json # Chrome Extension Manifest V3
โโโ lib/kuromoji.js # Kuromoji tokenizer (bundled)
โโโ dict/ # IPAdic dictionary files (~16MB)
All grammar rules, colors, and tooltips live in JSON files โ not in code. The extension reads registry.json to discover languages, loads each pack, and compiles fast lookup tables at runtime.
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/nihongo-color.git - Open Chrome โ
chrome://extensions/ - Enable Developer mode (top-right toggle)
- Click Load unpacked โ select the cloned folder
- Navigate to any page with Japanese/Korean/Chinese text and click the extension icon
URL: https://github.com/GHagui/nihongo-color
- Click in the button
< > Codein the repository page - Click in the
Download ZIPbutton - Unzip the downloaded file
- Open Chrome โ
chrome://extensions/ - Enable Developer mode (top-right toggle)
- Click Load unpacked โ select the cloned folder
- Navigate to any page with Japanese/Korean/Chinese text and click the extension icon
้ ๅผตใฃใฆใใ ใใ๏ผ โ Happy studying! ๐

