Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
o===============================================================================oo===============================================================================o | . . . . || . . . . | | : : : : || : : : : | | : . : . : . : || : . : . : . : | | .' . . .' . . .' . . .' . || .' . . .' . . .' . . .' . |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.// A loading spinner with 6 dots. | |
// By @marcedwards from @bjango. | |
// | |
// Pretty messy and hacked together, but it works. ¯\_(ツ)_/¯ | |
// Created using Processing 3.3.7. | |
float scaler = 0.24 * 4; // Scale the entire design. | |
float scalerb = 4; // Scale the entire design more. | |
int frame = 0; |
const fs = require('fs'); | |
const PNG = require('pngjs').PNG; | |
/* | |
Utilities | |
========= | |
*/ | |
const PNG_OPTIONS = { | |
GRAYSCALE_AND_ALPHA: 4, |
/** | |
* Calculate brightness value by RGB or HEX color. | |
* @param color (String) The color value in RGB or HEX (for example: #000000 || #000 || rgb(0,0,0) || rgba(0,0,0,0)) | |
* @returns (Number) The brightness value (dark) 0 ... 255 (light) | |
*/ | |
function brightnessByColor (color) { | |
var color = "" + color, isHEX = color.indexOf("#") == 0, isRGB = color.indexOf("rgb") == 0; | |
if (isHEX) { | |
var m = color.substr(1).match(color.length == 7 ? /(\S{2})/g : /(\S{1})/g); | |
if (m) var r = parseInt(m[0], 16), g = parseInt(m[1], 16), b = parseInt(m[2], 16); |
{ | |
"require": { | |
"mfacenet/hello-world": "v1.*" | |
} | |
} |
To make this work in CSS:
background: url('images.svg#chart');
or img:
<img src="images.svg#chart">