【css】cssでピクセルアートを作る方法 (PIXEL ART TO CSSを使用)

スポンサーリンク
css

最近NFT関連のニュースで、ピクセルアートが高値で取引されているというニュースをよくみます。
参考:https://news.yahoo.co.jp/articles/d749a89d9b980ba208a0146ebc6d1833cd77c80a

そこで、cssでピクセルアートっぽいものが作れないか調べたらちゃんとツールがあったので作り方を紹介します。

①PIXEL ART TO CSSにアクセス

以下サイトにアクセスする
PIXEL ART TO CSS

②作成

左側の色や筆マークを押下してドット部分に色付けしていく
とりあえず猫みたいなものを作ってみました

③つくったら左下cssボタンを押下

④コピー部分を押下してコピー

⑤コピーしたスタイルを貼り付ける

Codepenに貼り付けてみました。

.pixelart-to-css {
  box-shadow: 30px 10px 0 0 rgba(255,105,180,1), 170px 10px 0 0 rgba(255,105,180,1), 20px 20px 0 0 rgba(255,105,180,1), 30px 20px 0 0 rgba(255, 255, 255, 1), 40px 20px 0 0 rgba(255,105,180,1), 160px 20px 0 0 rgba(255,105,180,1), 170px 20px 0 0 rgba(255, 255, 255, 1), 180px 20px 0 0 rgba(255,105,180,1), 10px 30px 0 0 rgba(255,105,180,1), 20px 30px 0 0 rgba(255, 255, 255, 1), 30px 30px 0 0 rgba(255, 255, 255, 1), 40px 30px 0 0 rgba(255, 255, 255, 1), 50px 30px 0 0 rgba(255,105,180,1), 150px 30px 0 0 rgba(255,105,180,1), 160px 30px 0 0 rgba(255, 255, 255, 1), 170px 30px 0 0 rgba(255, 255, 255, 1), 180px 30px 0 0 rgba(255, 255, 255, 1), 190px 30px 0 0 rgba(255,105,180,1), 10px 40px 0 0 rgba(255,105,180,1), 20px 40px 0 0 rgba(255,105,180,1), 30px 40px 0 0 rgba(255,105,180,1), 40px 40px 0 0 rgba(255,105,180,1), 50px 40px 0 0 rgba(255,105,180,1), 60px 40px 0 0 rgba(255,105,180,1), 70px 40px 0 0 rgba(255,105,180,1), 80px 40px 0 0 rgba(255,105,180,1), 90px 40px 0 0 rgba(255,105,180,1), 100px 40px 0 0 rgba(255,105,180,1), 110px 40px 0 0 rgba(255,105,180,1), 120px 40px 0 0 rgba(255,105,180,1), 130px 40px 0 0 rgba(255,105,180,1), 140px 40px 0 0 rgba(255,105,180,1), 150px 40px 0 0 rgba(255,105,180,1), 160px 40px 0 0 rgba(255,105,180,1), 170px 40px 0 0 rgba(255,105,180,1), 180px 40px 0 0 rgba(255,105,180,1), 190px 40px 0 0 rgba(255,105,180,1), 200px 40px 0 0 rgba(255,105,180,1), 10px 50px 0 0 rgba(255,105,180,1), 20px 50px 0 0 rgba(255,105,180,1), 30px 50px 0 0 rgba(255,105,180,1), 40px 50px 0 0 rgba(255,105,180,1), 50px 50px 0 0 rgba(255,105,180,1), 60px 50px 0 0 rgba(255,105,180,1), 70px 50px 0 0 rgba(255,105,180,1), 80px 50px 0 0 rgba(255,105,180,1), 90px 50px 0 0 rgba(255,105,180,1), 100px 50px 0 0 rgba(255,105,180,1), 110px 50px 0 0 rgba(255,105,180,1), 120px 50px 0 0 rgba(255,105,180,1), 130px 50px 0 0 rgba(255,105,180,1), 140px 50px 0 0 rgba(255,105,180,1), 150px 50px 0 0 rgba(255,105,180,1), 160px 50px 0 0 rgba(255,105,180,1), 170px 50px 0 0 rgba(255,105,180,1), 180px 50px 0 0 rgba(255,105,180,1), 190px 50px 0 0 rgba(255,105,180,1), 200px 50px 0 0 rgba(255,105,180,1), 10px 60px 0 0 rgba(255,105,180,1), 20px 60px 0 0 rgba(255,105,180,1), 30px 60px 0 0 rgba(255,105,180,1), 40px 60px 0 0 rgba(255,105,180,1), 50px 60px 0 0 rgba(255, 255, 255, 1), 60px 60px 0 0 rgba(255, 255, 255, 1), 70px 60px 0 0 rgba(255,105,180,1), 80px 60px 0 0 rgba(255,105,180,1), 90px 60px 0 0 rgba(255,105,180,1), 100px 60px 0 0 rgba(255,105,180,1), 110px 60px 0 0 rgba(255,105,180,1), 120px 60px 0 0 rgba(255, 255, 255, 1), 130px 60px 0 0 rgba(255, 255, 255, 1), 140px 60px 0 0 rgba(255,105,180,1), 150px 60px 0 0 rgba(255,105,180,1), 160px 60px 0 0 rgba(255,105,180,1), 170px 60px 0 0 rgba(255,105,180,1), 180px 60px 0 0 rgba(255,105,180,1), 190px 60px 0 0 rgba(255,105,180,1), 200px 60px 0 0 rgba(255,105,180,1), 10px 70px 0 0 rgba(255,105,180,1), 20px 70px 0 0 rgba(255,105,180,1), 30px 70px 0 0 rgba(255,105,180,1), 40px 70px 0 0 rgba(255,105,180,1), 50px 70px 0 0 rgba(255, 255, 255, 1), 60px 70px 0 0 rgba(255, 255, 255, 1), 70px 70px 0 0 rgba(255,105,180,1), 80px 70px 0 0 rgba(255,105,180,1), 90px 70px 0 0 rgba(255,105,180,1), 100px 70px 0 0 rgba(255,105,180,1), 110px 70px 0 0 rgba(255,105,180,1), 120px 70px 0 0 rgba(255, 255, 255, 1), 130px 70px 0 0 rgba(255, 255, 255, 1), 140px 70px 0 0 rgba(255,105,180,1), 150px 70px 0 0 rgba(255,105,180,1), 160px 70px 0 0 rgba(255,105,180,1), 170px 70px 0 0 rgba(255,105,180,1), 180px 70px 0 0 rgba(255,105,180,1), 190px 70px 0 0 rgba(255,105,180,1), 200px 70px 0 0 rgba(255,105,180,1), 220px 70px 0 0 rgba(255,105,180,1), 230px 70px 0 0 rgba(255,105,180,1), 10px 80px 0 0 rgba(255,105,180,1), 20px 80px 0 0 rgba(255,105,180,1), 30px 80px 0 0 rgba(255,105,180,1), 40px 80px 0 0 rgba(255,105,180,1), 50px 80px 0 0 rgba(255, 255, 255, 1), 60px 80px 0 0 rgba(255, 255, 255, 1), 70px 80px 0 0 rgba(255,105,180,1), 80px 80px 0 0 rgba(255,105,180,1), 90px 80px 0 0 rgba(255,105,180,1), 100px 80px 0 0 rgba(255,105,180,1), 110px 80px 0 0 rgba(255,105,180,1), 120px 80px 0 0 rgba(255, 255, 255, 1), 130px 80px 0 0 rgba(255, 255, 255, 1), 140px 80px 0 0 rgba(255,105,180,1), 150px 80px 0 0 rgba(255,105,180,1), 160px 80px 0 0 rgba(255,105,180,1), 170px 80px 0 0 rgba(255,105,180,1), 180px 80px 0 0 rgba(255,105,180,1), 190px 80px 0 0 rgba(255,105,180,1), 220px 80px 0 0 rgba(255,105,180,1), 230px 80px 0 0 rgba(255,105,180,1), 240px 80px 0 0 rgba(255,105,180,1), 10px 90px 0 0 rgba(255,105,180,1), 20px 90px 0 0 rgba(255,105,180,1), 30px 90px 0 0 rgba(255,105,180,1), 40px 90px 0 0 rgba(255,105,180,1), 50px 90px 0 0 rgba(255,105,180,1), 60px 90px 0 0 rgba(255,105,180,1), 70px 90px 0 0 rgba(255,105,180,1), 80px 90px 0 0 rgba(255,105,180,1), 90px 90px 0 0 rgba(255,105,180,1), 100px 90px 0 0 rgba(255,105,180,1), 110px 90px 0 0 rgba(255,105,180,1), 120px 90px 0 0 rgba(255,105,180,1), 130px 90px 0 0 rgba(255,105,180,1), 140px 90px 0 0 rgba(255,105,180,1), 150px 90px 0 0 rgba(255,105,180,1), 160px 90px 0 0 rgba(255,105,180,1), 170px 90px 0 0 rgba(255,105,180,1), 180px 90px 0 0 rgba(255,105,180,1), 190px 90px 0 0 rgba(255,105,180,1), 240px 90px 0 0 rgba(255,105,180,1), 10px 100px 0 0 rgba(255,105,180,1), 20px 100px 0 0 rgba(255,105,180,1), 30px 100px 0 0 rgba(255,105,180,1), 40px 100px 0 0 rgba(255,105,180,1), 50px 100px 0 0 rgba(255,105,180,1), 60px 100px 0 0 rgba(255,105,180,1), 70px 100px 0 0 rgba(255,105,180,1), 80px 100px 0 0 rgba(96, 125, 139, 1), 90px 100px 0 0 rgba(96, 125, 139, 1), 100px 100px 0 0 rgba(255,105,180,1), 110px 100px 0 0 rgba(255,105,180,1), 120px 100px 0 0 rgba(255,105,180,1), 130px 100px 0 0 rgba(255,105,180,1), 140px 100px 0 0 rgba(255,105,180,1), 150px 100px 0 0 rgba(255,105,180,1), 160px 100px 0 0 rgba(255,105,180,1), 170px 100px 0 0 rgba(255,105,180,1), 180px 100px 0 0 rgba(255,105,180,1), 220px 100px 0 0 rgba(255,105,180,1), 230px 100px 0 0 rgba(255,105,180,1), 240px 100px 0 0 rgba(255,105,180,1), 20px 110px 0 0 rgba(255,105,180,1), 30px 110px 0 0 rgba(255,105,180,1), 40px 110px 0 0 rgba(255,105,180,1), 50px 110px 0 0 rgba(255,105,180,1), 60px 110px 0 0 rgba(255,105,180,1), 70px 110px 0 0 rgba(96, 125, 139, 1), 80px 110px 0 0 rgba(255,105,180,1), 90px 110px 0 0 rgba(255,105,180,1), 100px 110px 0 0 rgba(96, 125, 139, 1), 110px 110px 0 0 rgba(255,105,180,1), 120px 110px 0 0 rgba(255,105,180,1), 130px 110px 0 0 rgba(255,105,180,1), 140px 110px 0 0 rgba(255,105,180,1), 150px 110px 0 0 rgba(255,105,180,1), 160px 110px 0 0 rgba(255,105,180,1), 170px 110px 0 0 rgba(255,105,180,1), 220px 110px 0 0 rgba(255,105,180,1), 230px 110px 0 0 rgba(255,105,180,1), 30px 120px 0 0 rgba(255,105,180,1), 40px 120px 0 0 rgba(255,105,180,1), 50px 120px 0 0 rgba(255,105,180,1), 60px 120px 0 0 rgba(255,105,180,1), 70px 120px 0 0 rgba(255,105,180,1), 80px 120px 0 0 rgba(255,105,180,1), 90px 120px 0 0 rgba(255,105,180,1), 100px 120px 0 0 rgba(255,105,180,1), 110px 120px 0 0 rgba(255,105,180,1), 120px 120px 0 0 rgba(255,105,180,1), 130px 120px 0 0 rgba(255,105,180,1), 140px 120px 0 0 rgba(255,105,180,1), 150px 120px 0 0 rgba(255,105,180,1), 160px 120px 0 0 rgba(255,105,180,1), 230px 120px 0 0 rgba(255,105,180,1), 240px 120px 0 0 rgba(255,105,180,1), 50px 130px 0 0 rgba(255,105,180,1), 60px 130px 0 0 rgba(255,105,180,1), 70px 130px 0 0 rgba(255,105,180,1), 80px 130px 0 0 rgba(255,105,180,1), 90px 130px 0 0 rgba(255,105,180,1), 100px 130px 0 0 rgba(255,105,180,1), 110px 130px 0 0 rgba(255,105,180,1), 120px 130px 0 0 rgba(255,105,180,1), 130px 130px 0 0 rgba(255,105,180,1), 140px 130px 0 0 rgba(255,105,180,1), 150px 130px 0 0 rgba(255,105,180,1), 160px 130px 0 0 rgba(255,105,180,1), 170px 130px 0 0 rgba(255,105,180,1), 180px 130px 0 0 rgba(255,105,180,1), 190px 130px 0 0 rgba(255,105,180,1), 200px 130px 0 0 rgba(255,105,180,1), 210px 130px 0 0 rgba(255,105,180,1), 220px 130px 0 0 rgba(255,105,180,1), 230px 130px 0 0 rgba(255,105,180,1), 240px 130px 0 0 rgba(255,105,180,1), 70px 140px 0 0 rgba(255,105,180,1), 80px 140px 0 0 rgba(255,105,180,1), 90px 140px 0 0 rgba(255,105,180,1), 100px 140px 0 0 rgba(255,105,180,1), 110px 140px 0 0 rgba(255,105,180,1), 120px 140px 0 0 rgba(255,105,180,1), 130px 140px 0 0 rgba(255,105,180,1), 140px 140px 0 0 rgba(255,105,180,1), 150px 140px 0 0 rgba(255,105,180,1), 160px 140px 0 0 rgba(255,105,180,1), 170px 140px 0 0 rgba(255,105,180,1), 180px 140px 0 0 rgba(255,105,180,1), 190px 140px 0 0 rgba(255,105,180,1), 200px 140px 0 0 rgba(255,105,180,1), 210px 140px 0 0 rgba(255,105,180,1), 220px 140px 0 0 rgba(255,105,180,1), 230px 140px 0 0 rgba(255,105,180,1), 240px 140px 0 0 rgba(255,105,180,1), 250px 140px 0 0 rgba(255,105,180,1), 70px 150px 0 0 rgba(255,105,180,1), 80px 150px 0 0 rgba(255,105,180,1), 90px 150px 0 0 rgba(255,105,180,1), 100px 150px 0 0 rgba(255,105,180,1), 110px 150px 0 0 rgba(255,105,180,1), 120px 150px 0 0 rgba(255,105,180,1), 130px 150px 0 0 rgba(255,105,180,1), 140px 150px 0 0 rgba(255,105,180,1), 150px 150px 0 0 rgba(255,105,180,1), 160px 150px 0 0 rgba(255,105,180,1), 170px 150px 0 0 rgba(255,105,180,1), 180px 150px 0 0 rgba(255,105,180,1), 190px 150px 0 0 rgba(255,105,180,1), 200px 150px 0 0 rgba(255,105,180,1), 210px 150px 0 0 rgba(255,105,180,1), 220px 150px 0 0 rgba(255,105,180,1), 230px 150px 0 0 rgba(255,105,180,1), 240px 150px 0 0 rgba(255,105,180,1), 250px 150px 0 0 rgba(255,105,180,1), 70px 160px 0 0 rgba(255,105,180,1), 80px 160px 0 0 rgba(255,105,180,1), 90px 160px 0 0 rgba(255,105,180,1), 100px 160px 0 0 rgba(255,105,180,1), 110px 160px 0 0 rgba(255,105,180,1), 120px 160px 0 0 rgba(255,105,180,1), 130px 160px 0 0 rgba(255,105,180,1), 140px 160px 0 0 rgba(255,105,180,1), 150px 160px 0 0 rgba(255,105,180,1), 160px 160px 0 0 rgba(255,105,180,1), 170px 160px 0 0 rgba(255,105,180,1), 180px 160px 0 0 rgba(255,105,180,1), 190px 160px 0 0 rgba(255,105,180,1), 200px 160px 0 0 rgba(255,105,180,1), 210px 160px 0 0 rgba(255,105,180,1), 220px 160px 0 0 rgba(255,105,180,1), 230px 160px 0 0 rgba(255,105,180,1), 240px 160px 0 0 rgba(255,105,180,1), 250px 160px 0 0 rgba(255,105,180,1), 80px 170px 0 0 rgba(255,105,180,1), 90px 170px 0 0 rgba(255,105,180,1), 100px 170px 0 0 rgba(255,105,180,1), 110px 170px 0 0 rgba(255,105,180,1), 120px 170px 0 0 rgba(255,105,180,1), 130px 170px 0 0 rgba(255,105,180,1), 140px 170px 0 0 rgba(255,105,180,1), 150px 170px 0 0 rgba(255,105,180,1), 160px 170px 0 0 rgba(255,105,180,1), 170px 170px 0 0 rgba(255,105,180,1), 180px 170px 0 0 rgba(255,105,180,1), 190px 170px 0 0 rgba(255,105,180,1), 200px 170px 0 0 rgba(255,105,180,1), 210px 170px 0 0 rgba(255,105,180,1), 220px 170px 0 0 rgba(255,105,180,1), 230px 170px 0 0 rgba(255,105,180,1), 240px 170px 0 0 rgba(255,105,180,1), 250px 170px 0 0 rgba(255,105,180,1), 80px 180px 0 0 rgba(255,105,180,1), 90px 180px 0 0 rgba(255,105,180,1), 100px 180px 0 0 rgba(255,105,180,1), 110px 180px 0 0 rgba(255,105,180,1), 120px 180px 0 0 rgba(255,105,180,1), 130px 180px 0 0 rgba(255,105,180,1), 200px 180px 0 0 rgba(255,105,180,1), 210px 180px 0 0 rgba(255,105,180,1), 220px 180px 0 0 rgba(255,105,180,1), 230px 180px 0 0 rgba(255,105,180,1), 240px 180px 0 0 rgba(255,105,180,1);
  height: 10px;
  width: 10px;
}

htmlは以下を記述

<p class='pixelart-to-css'></p>

Codepen上で出力されることを確認

ちなみにcssボタンの下のボタン押下でpngファイルとしてもダウンロードできる

↓ダウンロードしたpngデータ

終わりに

とても使いやすく簡単に作れるツールでした。
作成したピクセルアートに動きを追加したり、3Dにしてみたりもできそうなので色々いじってみます。

読んで頂きありがとうございました!

css
スポンサーリンク
app crafts

コメント

タイトルとURLをコピーしました