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[]): ElectronNativeImage

Parameters:

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

Returns: ElectronNativeImage — The created image.