Url2Ascii (Color)

Written 11:18 am 3/29/2013 Modifed 04:15 pm 4/4/2013
Kim Jong Un approves.

I made a utility a while ago to convert images to ascii, for covert reddit browsing ability. I recently added color to it.

The script gives you a number of customizations- you can change the x / y ratio for your glyphs, which characters get printed out, and at what brightness, and you can calibrate the colors to match your terminal. This is specifically for 8 color terminals

The inner workings have it resampling the image to your indicated terminal size. It then converts each box into its HSV values. It tries to best match the HSV by changing the glyph, the foreground color, and the background color. You can check the code if you're interested

View on Github

Run this in the shell:

curl -Ls https://gist.github.com/oranj/5271841/raw/url2ascii.php | php -- http://oranj.io/uploads/misc/url2ascii/flower_2.jpg

Or if you want to select your own image (This script is mac only):

file=`osascript -e 'tell app (path to frontmost application as Unicode text) to set new_file to POSIX path of (choose file with prompt "Select A File" of type {"PNG", "JPG", "JPEG"})'  2> /dev/null`; curl -Ls https://gist.github.com/oranj/5271841/raw/url2ascii.php | php -- "$file"

input output

Using a screen color grabber (like DigitalColor Meter, should come on macs), you can figure out what your terminal's colors are using the calibration function, calling

url2ascii calibrate

calibration

Posted by Anonymous on July 9th, 2018, 1:58 pm Reply

I want purchase a pair of shoes,but I don't know which webstore is much better. Who can give me some recommend?

Posted by JamesBor on July 4th, 2018, 5:03 am Reply

???????? seo ??????????? ????? ? ??????? ?? ???? ????????? ???????? ?? ?????? ?????????? ? ????? ????? SEO PRO1 ?? ? ????????????? ??????? ?? ??? ???????????? ??? ???????...?????? ?????? ????????-??????? ?????????

Posted by Anonymous on July 1st, 2018, 2:35 pm Reply

??????? ???! ???????? ? ??? ????!

????????? ???? ????? ? google ????? atv71es5c28n4 ? ????? prom electric. ??????????!

???????!

Posted by Thurmanmob on June 27th, 2018, 11:08 pm Reply

???????????????????????? ??????????? ?????, ??????? ?????, ????? ??? ???

Posted by Anonymous on June 25th, 2018, 8:09 pm Reply

???????? ???.

Posted by Anonymous on June 24th, 2018, 5:08 pm Reply

???????? ???.

Posted by Anonymous on June 22nd, 2018, 1:14 am Reply

?????? ????????-???????? "??????" ????? ??????? ??? ??????? ?????????, ??? ? ?????????? ??????????, ??????, ????????? ? ?????? ??????????, ? ????????? ??????? ????? ?????????? ????. ?? ??????? ??????? ????? ?? ????, ????????????? ??????? ??????????? ???????????? ??????? ?? ???????????? ?????????. ???????? ??????? ????????????? ????????????? ???? ? ??????????? ?????, ????? ???????????? ???????? ?????? ?????? ???????.

????????? ??????? ????? ?? ????, ??? ?? ???????? ????????????? ??????????? ????????????? ???????.????? ???????, ?? ??????? ???????? ???? ??? ?? ??????????, ?????????? ? ??????? ???????? ??????? ?????? ?? ???????????.

??? ???????, ?????????? ?????? ???? ???????? ?? ?????? ??????? ????, ????? ??????? ?? ??? ??????? ??????? ?????????.? ??? ??????, ???? ??? ????? ????? ??????? ????, ? ???????, ??? ????, ????? ?????? ?????, ?? ??????? ??????????????? ??????????? ??????.

? ????? ???????? ???????????? ????? ???????????? ??? ???? ????? ???? (??? ??????????? ??? ???????????).????????? ???????? ???????????? ??????, ?? ????? ??????? ????????? ?????? ?? ???????, ??????? ??? ?????? ????? ????????.????? ???????? ???????????? ??????? ? ??? ?? ?????? ???????? ????? ??????, ???????????, ???????? ????? ? ?.?.???? ???????? ?????????? ?????? ?? ????????? ??????? ??????????????.

? ???????? - ???????? "??????" ?? ??????? ?????????? ????? ????????????? ???????? ????????.???? ??????????? ????? ????: ????????, ? ????????, ? ?????????, ? ?????????? ??????.

?????? ??????????? ? ???????????? ??????? ? ??????? ???????? ??????????? ??????? ?????? ??? ????? ???????????????? ????? ????????????, ????? ???????? ????????? ???????????? ?? ????????????? ??? ???????.????????? ? ???? ?? ????????, ? ?? ??????????? ??????? ??? ??????? ?????????? ?????. ??? ????, ?????? ?? ??????? ??????? ????? ????????? ?????????????? ?? ????? ?????.

?????? ????? ?? ??????? ??????? ???????, ???????? ?????????????? ?? ???? ?????????? ?????????? ?????????, ??? ???? ?? ?????????? ????????? ???????? ??????.?? ?????? ????????? ????????:

  • ?? ????????? ???? ???????????? ????;
  • ??? ?????? ?????????? ??????????? ????????? ??????;
  • ? ??????? ????????????? ????? ???????????? ????????. ???????? ???????? ?? ??, ??? ??????? ??????????? ??????? ??????????? ??????????? ????????? ????? ???????????? ????????.

?????????? ?? ???? ????????-???????? Avalor ????? ??????, ????? ? ????????? ??????? ???????? ?????, ? ??????????? ????? ?? ??????.

Posted by Anonymous on June 21st, 2018, 2:16 pm Reply

???????????? ???, ?????????? ????? ????? ?????? ?????????????????? ???????????? ??????

Posted by Anonymous on June 21st, 2018, 5:50 am Reply

???? ?????? ? ????.

Posted by ????? ???? on June 8th, 2018, 9:28 pm Reply

?????????! ????????? ????? )

Posted by Anonymous on May 26th, 2018, 7:37 am Reply

Hello. And Bye.