New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pixel-icon

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixel-icon

The simplest pixel icon generator

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

PIXEL ICON JS

The simplest javascript icon editor.

What is this?

It's a very simple library to create and render your own icons by just providing a codified string.

How do I use it?

First, go to the editor and create an icon. Copy the resulting code to your project and the icon will render as an img tag.

Options & advanced usage

You can pass an options object when rendering an icon. Here's a full feature example:

import PixelIcon from "pixel-icon"

PixelIcon(yourContainer, yourIconCode, {
	// color palette of your image.
	colors: [
		"#000",
		"#47A8BD",
		"#9FD356",
		"#9C3848",
		"#FFF"
	],
	// if true, renders a border between each pixel to create a grid-like image 
	hasBorder: false, 
	// number of vertical and horizontal pixels
	size: 20
})

The properties size and colors will directly affect the size of the codified image as it will need more characters to be rendered.

Keywords

FAQs

Package last updated on 21 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc