Extensions/Assessment/blueLightFilter

Adds a semi-transparent overlay on top of the entire page. This is for users who have sensitivity to bright light, high contrast, or blue light.

Parameters:
NameTypeAttributesDescription
optionsobject<optional>

Object of configuration options.

Properties
NameTypeAttributesDescription
customColorstring<optional>

A custom color value to use for the overlay. Recommend rgba. Defaults to rgba(250, 170, 140, 0.5)

customZIndexnumber<optional>

A custom z-index value to use for the overlay. Defaults to 99999.

Example
const options = {
    customColor: 'rgba(250, 170, 140, 0.5)',
    customZIndex: 99999
}

LT.init(itemsApp, {
    extensions: [
        { id: 'blueLightFilter', args: options }
    ],
});

Methods

hide() → {void}

Hides the blue light filter if it is currently visible. If the filter is already hidden, it does nothing.

Since
3.0.0
Returns: 
void

show() → {void}

Shows the blue light filter if it is currently hidden. If the filter is already visible, it does nothing.

Since
3.0.0
Returns: 
void

toggle() → {boolean}

Shows or hides the blue light filter. Returns true if the blue light filter is currently visible, false otherwise.

Since
3.0.0
Returns: 
boolean