Skip to content

Instantly share code, notes, and snippets.

@lpre-ys
lpre-ys / gist:c2750e44fd32c361345596f681a0f42a
Last active May 22, 2026 05:40
タコスメモ
@lpre-ys
lpre-ys / main.js
Created January 21, 2017 14:23
PNG8のカラーパレットを読んで、緑(0, 255, 0)を先頭に持ってくるスクリプト
'use strict';
// please install crc package
const crc = require('crc');
const fs = require('fs');
const zlib = require('zlib');
if (!process.argv[2]) {
throw Error('please input png-path');
// use webpack and babel!
import base64_arraybuffer from 'base64-arraybuffer';
const handleDragOver = (e) => {
e.stopPropagation();
e.preventDefault();
e.dataTransfer.dropEffect = 'copy';
};
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Gradation test</title>
<style type="text/css">
* {
box-sizing: border-box;
margin: 0;
padding: 0;
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>File API Test</title>
<style type="text/css">
.filedrop {
width: 600px;
height:200px;
border: 1px solid #000;