Skip to content

ElectronNativeImageModule.createFromNamedImage method

ElectronNativeImageModule › createFromNamedImage

Unofficial

Creates a new NativeImage instance from the NSImage that maps to the given image name. Only available on macOS.

Signature:

createFromNamedImage(imageName: string, hslShift?: number[] | undefined): ElectronNativeImage

Parameters:

ParameterTypeDescription
imageNamestringThe name of the system image.
hslShift?number[] | undefinedAn HSL shift applied to the image, as [hue, saturation, lightness].

Returns: ElectronNativeImageThe created image.