textmode.js / media / TextmodeImage / brightnessRange
Method: brightnessRange()
ts
brightnessRange(start, end): this;Capture only source pixels whose brightness is inside the inclusive byte range.
Pixels outside the range are discarded by the built-in brightness converter, leaving the corresponding textmode cells transparent.
Parameters
| Parameter | Type | Description |
|---|---|---|
start | number | Minimum brightness to capture, from 0 (black) to 255 (white). |
end | number | Maximum brightness to capture, from 0 (black) to 255 (white). |
Returns
this
This instance for chaining.