
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
script-arts
Advanced tools
Another one npm package :) Encode any text files into images and decode them back.
"Code like no one's watching." @noopkat From #jsconf Budapest "Formulartic Spectrum".
npm install -g script-arts
script-arts --help
script-arts encode --help
script-arts decode --help
Theme - is a symbol encode (symbol to rgb) / decode (rgb to symbol) rule.
{
encode: function(symbol),
decode: function(rgb)
}
Iterator - is how we will iterate image and source file. Could be linear, or by lines or even radial. Also responsible on image size and form.
{
iterateSource: function(source, encode),
iterateImage: function(image, decode)
}
linear (default) script-arts encode source output -i linear. Iterate by symbols
lines script-arts encode source output -i lines. Iterate by lines
char code (default) script-arts encode source output -t char-code. Translate symbol code to hex. -d <number> code offset. If delta was used for encode - same value should be used for decode.
spaces and semicolons script-arts encode source output -t spaces-and-semicolons. Highlite spaces and semicolons. Other symbols will be encoded with char-code theme.
js script-arts encode source output -t js. Highlite js keywords.
md script-arts encode source output -t md. Highlite md keywords.
Existing themes:
import chartCodeTheme from 'script-arts/themes/char-code-theme';
import { add as addTheme } from 'script-arts/src/themes';
import encode from 'script-arts/encode';
const myTheme = options => {
return chartCodeTheme({
...options,
matches: {
// encode whole words with specific colors
'constructor': '#ffcc33',
'var': '#cc0000',
'const': '#54DE43',
'new': '#54DE43',
// encode each symbol of "decode" word with specific color
'for': ['#E74C3C', '#ECF0F1', '#ECF0F1']
}
}),
}
addTheme('my-theme', {
create: myTheme,
// bottom left image corner will be marked with this color
// will be used for decode() - automatically detect encoded theme.
color: '#47D0DB'
});
encode('path/to/source-file', 'path/to/output-image', {
theme: 'my-theme',
iterator: 'lines',
delta: 2512 // if you want to make char code offset
}).then(() => {
console.log('done');
})
Sames as custom themes. Default iterators example:
You are welcome to this useless app better :)
Use npm run dev to start watchers and convert ES6 code from /src/ dir.
Use npm run test - to run tests.
Use npm run test-dev - to start tests with watchers.


Tests are ok. But travis fails. And I dont care :)

FAQs
---
The npm package script-arts receives a total of 0 weekly downloads. As such, script-arts popularity was classified as not popular.
We found that script-arts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.