News for hackers. Stuff that matters.
Re:Pure Sh Bible by chasil on Sunday April 30, 2023 @05:07PM (#35766632)
Here are my scary evals to use basic ANSI/vt220 color.

  N="$(printf '\033[')" x=30

  for a in Bl R G Y B M C W # 4-bit Black Red Green Yellow Blue Magenta Cyan White
  do eval $a='$N'"'"$((   x))"m'" \
         b$a='$N'"'"$((60+x))"m'" \
      ${a}bg='$N'"'"$((10+x))"m'" \
     b${a}bg='$N'"'"$((70+x))"m'"        # bX=bright Xbg=background bXbg=brgt bgnd
     x=$((x+1))
  done

  N="${N}0m"

  printf "$Y${Gbg}I am yellow on green.$N\n"
I pasted this into my Android terminal, and it works as advertised.
Re:Pure Sh Bible by fsckboy on Sunday April 30, 2023 @08:29PM (#35767845)
I am curious yellow

on green is all that prints out? What's the rest of it for?

Re:Pure Sh Bible by chasil on Sunday April 30, 2023 @11:19PM (#35768754)
It's a general set of assignments that let you make any colors that you like.

That's only an example. Use them all, if you want.