Image Threshold Tool β Convert to Pure Black & White
Convert any image to pure black and white using a customizable luminance threshold. Great for making stencils, laser engraving prep, or graphic art.
UD5 Toolkit
Visualize & debug intersection thresholds, rootMargin, and real-time ratio
threshold?
Threshold defines at what percentage of target visibility the callback fires. A value of 0 means the callback fires as soon as even one pixel is visible. 1.0 means the callback only fires when 100% of the target is visible. You can pass an array like [0, 0.5, 1] to fire at multiple visibility levels.
rootMargin?
rootMargin expands or shrinks the observation area of the root element. A positive margin (e.g., 20px) makes the observer fire earlier β before the target actually enters the root. A negative margin (e.g., -20px) delays firing until the target is further inside.
isIntersecting vs intersectionRatio
isIntersecting is true when any part of the target is within the observation area (ratio > 0). intersectionRatio represents the fraction of the target that is visible, ranging from 0.0 to 1.0.
πΌοΈ Lazy loading images when they scroll into view
π Infinite scroll β load more content as user approaches the bottom
π Analytics β track when elements become visible to users
π¬ Animations β trigger entrance animations on scroll
[0, 0.5, 1]), the observer fires a callback each time the intersection ratio crosses one of those thresholds β either going up (entering) or down (leaving). This is by design and allows you to respond to different levels of visibility.
IntersectionObserver instance can observe multiple target elements. Simply call observer.observe(element) for each element. The callback receives an array of all entries that had an intersection change. This is more efficient than creating separate observers.
rootMargin expands the observation area, which may cause the observer to track more elements and fire more callbacks. This has a minor performance cost. Negative margins shrink the area and can slightly improve performance. For most use cases, the impact is negligible β the Intersection Observer API is asynchronous and highly optimized by browsers.
observer.disconnect()) to prevent memory leaks. For lazy loading, consider using rootMargin to start loading resources slightly before they become visible.
Convert any image to pure black and white using a customizable luminance threshold. Great for making stencils, laser engraving prep, or graphic art.
Type JavaScript expressions and see output like a real browser console. Supports console.log, error, warn. Use for quick testing without DevTools.
Set up multiple @layers and use revertβlayer to fall back. See the computed style and cascade resolution live.
See your current push subscription details. Trigger push and notificationclick events manually to debug.
Create errors with the cause option and see chained error objects. Learn error wrapping for better debugging.
Highlight elements with ariaβdescribedby and see the linked description text. Verify a11y annotations.
Adjust a brightness threshold slider and see the live vector trace of an image. Export as SVG. Potraceβstyle.
Select any element on the test page and monitor its size changes with ResizeObserver. See log of all entries.
See the current Service Worker registration, its state, and scope. Send 'skipWaiting' and update. PWA debug.
Load an image and see the exact events fired (load, error, abort). Monitor progress. Dev helper.
Fill in a form and see the FormData object as JSON. Perfect for debugging multipart form submissions. Client-side.
See the current AudioContext state (suspended, running). Resume it with a button. Understand autoplay policies.
Test required, pattern, minlength etc. See validity states and custom error messages. Learn browserβnative validation.
Inject dynamic messages into ARIA live regions and monitor how they trigger screen reader announcements. Debug a11y.
Start recording and watch for Long Tasks that block the main thread. See task duration and attribution. Improve Interaction to Next Paint.
Paste a `SetβCookie` header and see all attributes parsed: domain, path, MaxβAge, SameSite, Secure, HttpOnly. Debug cookies easily.
Touch the screen and see the exact coordinates, radius, and force of each touch point. Indispensable for mobile web devs.
See the current state of a Service Worker for your page: installing, waiting, active. Unregister or skip waiting. Developer utility.
Convert any photo into a stark 1βbit blackβandβwhite image (no grays). Adjust threshold. Save as PNG.
Paste a list of JavaScript values and see them prettyβprinted as if in the browser console. Great for debugging.
Scroll down to see images load lazily. Code snippet provided. Learn how native loading='lazy' works.
Enter a JSON pointer expression (/foo/bar) to extract a value from your pasted JSON. Debug nested objects quickly.
Press any key and see the full KeyboardEvent object: key, code, keyCode, modifier status. Dev tool.
Paste HTML/CSS snippets or enter properties to test how zβindex and stacking contexts interact. Realβtime example.
Enter a regular expression and see a visual railroad diagram explaining the pattern. Learn and debug regex.