← Go home


Last updated: Dec 26, 2020

px → css

Turn pixel art into HTML/CSS code that you can use on your site. Originally designed for use on AO3.

This page can be downloaded and used offline. It is completely self contained and can be saved as HTML only.

Contact me on Neocities or Curiouscat if you have questions, bug reports, or feature suggestions. Credit to Tim Down on Stack Overflow for his RGB to hex code snippet.


1. Upload

Warning: .png files only. Keep the image size low; the output text can get extremely large, if the page doesn't crash first.



2. Name

Give the element a unique ID so the style can be applied properly.


3. Scale

Set the scale of the art. You don't need to resize your image in an image editing application.


4. Generate


Body

Paste this into the html of your website.


CSS

Paste this into your stylesheet or inside of <style> tags.


Preview