# @the-/icon

> Icon generator

Latest version **16.6.1** (published 2020-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @the-/icon
pnpm add @the-/icon
yarn add @the-/icon
bun add @the-/icon
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 16.6.1 |
| Published | 2020-05-08 |
| First published | 2019-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 103.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | lib, the |

## Links

- npm: https://www.npmjs.com/package/@the-/icon
- Repository: https://github.com/the-labo/the
- Homepage: https://github.com/the-labo/the/tree/master/packages/icon#readme
- Issues: https://github.com/the-labo/the#issues
- npm.io page: https://npm.io/package/@the-/icon

## Dependencies (3)

- [canvas](https://npm.io/package/canvas.md) ^2.6.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [@the-/util-color](https://npm.io/package/@the-/util-color.md) ^15.5.1

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 16.6.1 (latest) — 2020-05-08
- 16.6.0 — 2020-04-15
- 16.5.0 — 2019-06-03
- 15.4.13 — 2019-06-03
- 15.4.12 — 2019-06-01
- 15.4.11 — 2019-06-01
- 15.4.10 — 2019-06-01
- 15.4.9 — 2019-06-01
- 15.1.3 — 2019-03-30
- 15.1.2 — 2019-03-30
- 15.1.0 — 2019-03-29
- 15.0.4 — 2019-03-23
- 15.0.3 — 2019-03-23

## README

@the-/icon
==========

<!---
This file is generated by @the-/templates. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![npm Version][bd_npm_shield_url]][bd_npm_url]

[bd_repo_url]: https://github.com/the-labo/the
[bd_npm_url]: http://www.npmjs.org/package/@the-/icon
[bd_npm_shield_url]: http://img.shields.io/npm/v/@the-/icon.svg?style=flat

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Icon generator

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>




<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/readme/01.Installation.md.hbs" Start -->

<a name="section-doc-readme-01-installation-md"></a>

Installation
-----

```bash
$ npm install @the-/icon --save
```


<!-- Section from "doc/readme/01.Installation.md.hbs" End -->

<!-- Section from "doc/readme/02.Usage.md.hbs" Start -->

<a name="section-doc-readme-02-usage-md"></a>

Usage
---------

```javascript
'use strict'

/**
 * The is an example of Icon
 * @file example-usage.js
 */
const theIcon = require('@the-/icon')

const { Themes } = theIcon

async function tryExample() {
  const text = 'APE'
  const color = '#EA1'

  await theIcon({
    color,
    font: 'fonts/comicsans.ttf',
    text,
    theme: Themes.SQUARE,
  }).saveAs('foo/square-icon.png')
}

tryExample().catch((err) => console.error(err))

```


<!-- Section from "doc/readme/02.Usage.md.hbs" End -->

<!-- Section from "doc/readme/03.Themes.md.hbs" Start -->

<a name="section-doc-readme-03-themes-md"></a>

Themes
---------


| Theme | Sample Output | Sample code |
| ---  | ---- | ---- |
| `Themes.CIRCLE` | <img src="./example/images/circle.png" height="80"/> |`theIcon({ theme:Themes.CIRCLE, text:'APE', color: '#A11', }).saveAs('circle.png')` |
| `Themes.CIRCLE_FILL` | <img src="./example/images/circle-fill.png" height="80"/> |`theIcon({ theme:Themes.CIRCLE_FILL, text:'APE', color: '#A11', }).saveAs('circle-fill.png')` |
| `Themes.ROUND` | <img src="./example/images/round.png" height="80"/> |`theIcon({ theme:Themes.ROUND, text:'APE', color: '#A11', }).saveAs('round.png')` |
| `Themes.ROUND_FILL` | <img src="./example/images/round-fill.png" height="80"/> |`theIcon({ theme:Themes.ROUND_FILL, text:'APE', color: '#A11', }).saveAs('round-fill.png')` |
| `Themes.SQUARE` | <img src="./example/images/square.png" height="80"/> |`theIcon({ theme:Themes.SQUARE, text:'APE', color: '#A11', }).saveAs('square.png')` |
| `Themes.SQUARE_FILL` | <img src="./example/images/square-fill.png" height="80"/> |`theIcon({ theme:Themes.SQUARE_FILL, text:'APE', color: '#A11', }).saveAs('square-fill.png')` |


<!-- Section from "doc/readme/03.Themes.md.hbs" End -->


<!-- Sections Start -->

<a name="api"></a>

## API Guide


- module:@the-/icon
  - [.create(args)](./doc/api/api.md#module_@the-/icon.create)
  - [.helpers](./doc/api/api.md#module_@the-/icon.helpers)
  - [.icon()](./doc/api/api.md#module_@the-/icon.icon)
  - [.TheIcon](./doc/api/api.md#module_@the-/icon.TheIcon)
  - [.Themes](./doc/api/api.md#module_@the-/icon.Themes)
- module:@the-/icon.helpers
  - [.applier](./doc/api/api.md#module_@the-/icon.helpers.applier)
  - [.drawer](./doc/api/api.md#module_@the-/icon.helpers.drawer)
  - [.writer](./doc/api/api.md#module_@the-/icon.helpers.writer)
- TheIcon
  - [#saveAs(filename)](./doc/api/api.md#TheIcon#saveAs)

See [API Guide](./doc/api/api.md) for more detail


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [THE Labo][the_labo_url]

[the_labo_url]: https://github.com/the-labo

<!-- Links End -->

---
_Source: https://npm.io/package/@the-/icon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
