Skip to content

textmode.js / media / TextmodeTexture / 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

ParameterTypeDescription
startnumberMinimum brightness to capture, from 0 (black) to 255 (white).
endnumberMaximum brightness to capture, from 0 (black) to 255 (white).

Returns

this

This instance for chaining.

Example

Inherited from

TextmodeSource.brightnessRange