• LCrawford (unregistered)

    Frist the 50 Shades of Grey book was banned a Brad's company. After they removed all copies, Brad decided to go one better by removing 255 shades of grey.

  • Дмитрий (unregistered)

    #ffffff is missing in colorsBlackWhite

  • Robin (unregistered)

    That doesn't look like PHP to me, but some HTML templating language used by a backend framework which could be written in pretty much any language. (It looks quite a bit like Jinja which is a Python templating engine, but most of them look pretty similar.)

    Using such a think inside JS rather than just for HTML as designed though definitely looks like WTF territory.

  • dpm (unregistered)

    Good on Brad for justifying the word "pessimal"'s existence.

  • (nodebb)

    Imagine all the shenanigans to be described in the upcoming book called "200 shades of RGB"

  • Jason Stringify (unregistered)

    Presumably we also have:

    let colors = ["#000000", "#000001", "#000002", "#000003", ... // source truncated for brevity

  • Conrad Buck (unregistered)

    TRWTF is generating javascript with a templating language!! All static analysis, including vuln scanning and linting -- even the most basic reporting on compile errors -- will be gone.

  • (nodebb) in reply to Robin

    It might be Django: https://www.djangoproject.com/start/

  • Steevie (unregistered) in reply to Robin

    It seems Jinja2 to me as well, and yes, using it inside JS is a RWTF in itself!

  • Jeremy (unregistered)

    I love how colorsBlackWhite[idx] and colorsBlackWhite[idx +1] are optimized for maximum contrast between the first x layers

  • Robin (unregistered) in reply to ochrist

    yes, it could be - as I said, most of these templating engines are pretty similar in syntax

Leave a comment on “An Array of Colors”

Log In or post as a guest

Replying to comment #:

« Return to Article