Skip to content

Commit

Permalink
Improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JrMasterModelBuilder committed Jan 24, 2024
1 parent 7d466f8 commit 4bd49be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ await icns.addFromPng(await readFile('icon/16x16@2x.png'), ['ic11'], raw);
await writeFile('icon.icns', icns.encode());
```

### macOS ICNS with dark mode (current formats)
### macOS ICNS with dark mode embedded (current formats)

Since macOS 10.14 an ICNS icon can contain an embedded dark version which can be shown automatically in dark mode.

```js
import {readFile, writeFile} from 'node:fs/promises';
Expand Down Expand Up @@ -130,7 +132,7 @@ await dark.addFromPng(await readFile('dark/512x512@2x.png'), ['ic10']);
await dark.addFromPng(await readFile('dark/16x16@2x.png'), ['ic11']);
icns.addDarkIcns(dark.encode());

// Write the icon with the dark icon embeded.
// Write the icon with the dark icon embedded.
await writeFile('icon.icns', icns.encode());
```

Expand Down

0 comments on commit 4bd49be

Please sign in to comment.