{"library":"canvas-color-tracker","type":"library","category":null,"description":"canvas-color-tracker is a utility library (current stable version 1.3.2) designed to facilitate interaction with dynamically rendered objects on an HTML5 canvas, where native object-specific mouse events are not available. It provides a system for tracking canvas elements by assigning each a unique, invisible color key on a 'shadow' or off-screen canvas. Developers render their objects on this shadow canvas with these unique colors, then use `mousemove` events on the main canvas to sample the pixel color under the mouse pointer. This color is then used to look up the associated object in the `canvas-color-tracker` registry. A key feature is its checksum encoding mechanism for color keys, which enhances lookup reliability by accounting for pixel anti-aliasing and color mutations at object boundaries. The library focuses solely on the registry aspect: generating keys, registering objects, and performing lookups. It enables effective object identification and interaction for complex canvas applications, supporting up to approximately 262,000 objects with default settings.","language":"javascript","status":"active","version":"1.3.2","tags":["javascript","canvas","color","tracker","interaction","hover","hidden","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install canvas-color-tracker","imports":["import ColorTracker from 'canvas-color-tracker';","<script src=\"//cdn.jsdelivr.net/npm/canvas-color-tracker\"></script>"]},{"cmd":"yarn add canvas-color-tracker","imports":[]},{"cmd":"pnpm add canvas-color-tracker","imports":[]}],"homepage":null,"github":"https://github.com/vasturiano/canvas-color-tracker","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/canvas-color-tracker","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/canvas-color-tracker/compatibility"}}