• graphics.js limited to 16-color ANSI

    From Codefenix@VERT/CONCHAOS to ALL on Monday, April 20, 2026 13:48:58
    I wrote a mod a while back named Scroller which displays various text and ANSI files using a scrollable interface. It uses the graphic.js library for processing ANSI files and then returns the results as an array of strings, which it can then scroll through nicely.

    There seems to be growing interest recently in 256-color ANSI. I assumed initially that 256-colors should show up fine in my mod, however, when I was given a couple sample 256-color ANSI files to test with, the colors rendered as entirely gray (aka "light white"). It then ocurred to me that graphic.js only seems to support the standard 16 color ANSI sequences.

    Are there plans to enhance graphic.js in the future? Any alternatives to graphic.js?

    |08ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
    |15 Ü|07 Ü |08Ü |11codefenix |08³
    |15 Û|07ÛÛÛ|08Û |09ConstructiveChaos BBS |08³
    |15 Þ|07ÜÛÜ|08Ý |01conchaos.synchro.net |08³ |08ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
    |07
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
  • From Digital Man@VERT to Codefenix on Monday, April 20, 2026 12:54:09
    Re: graphics.js limited to 16-color ANSI
    By: Codefenix to ALL on Mon Apr 20 2026 01:48 pm

    Are there plans to enhance graphic.js in the future? Any alternatives to graphic.js?

    I don't know of any pending improvements to graphic.js, but it certainly is like most things in Synchronet, up for change as wanted or needed. If you feel like adding additional ANSI sequence support to graphic.js and submitting a PR, it'd likely be merged into master.
    --
    digital man (rob)

    Synchronet "Real Fact" #75:
    Rob's alias "digital man" was inspired by a song on Rush's 1982 "Signals" album Norco, CA WX: 73.6øF, 46.0% humidity, 7 mph WNW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Codefenix@VERT/CONCHAOS to Digital Man on Wednesday, April 22, 2026 08:40:54
    Re: graphics.js limited to 16-color ANSI
    By: Digital Man to Codefenix on Mon Apr 20 2026 12:54 pm

    I don't know of any pending improvements to graphic.js, but it certainly is like most things in Synchronet, up for change as wanted or needed. If you feel like adding additional ANSI sequence support to graphic.js and submitting a PR, it'd likely be merged into master.

    Yeah, I had a look, and it seems like quite the rabbit hole. :)

    I believe the ANS->MSG conversion that happens within would make this challenging, at least in my use case, since I don't think you can do 256 colors with CTRL-A codes (can you?).

    frame.js appears to have the same 16-color limitation as graphic.js upon initial glance.

    I think I'll back-burner this idea for now, and settle for detecting 256-color sequences, and if found, output using plain old console.printfile instead as a workaround.

    |08ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
    |15 Ü|07 Ü |08Ü |11codefenix |08³
    |15 Û|07ÛÛÛ|08Û |09ConstructiveChaos BBS |08³
    |15 Þ|07ÜÛÜ|08Ý |01conchaos.synchro.net |08³ |08ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
    |07
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
  • From Digital Man@VERT to Codefenix on Wednesday, April 22, 2026 10:29:39
    Re: graphics.js limited to 16-color ANSI
    By: Codefenix to Digital Man on Wed Apr 22 2026 08:40 am

    I believe the ANS->MSG conversion that happens within would make this challenging, at least in my use case, since I don't think you can do 256 colors with CTRL-A codes (can you?).

    No, Ctrl-A codes are limited to the usual ANSI.SYS/CGA palette.
    --
    digital man (rob)

    Synchronet "Real Fact" #16:
    Synchronet first supported FidoNet networking (with SBBSFIDO) in 1992
    Norco, CA WX: 62.0øF, 61.0% humidity, 1 mph WSW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net