Up to Main Index                          Up to Journal for November, 2016

                   JOURNAL FOR TUESDAY 22ND NOVEMBER, 2016
______________________________________________________________________________

SUBJECT: Light & dark
   DATE: Tue 22 Nov 22:17:53 GMT 2016

Recently I've been thinking about colours a lot. The reason being if I'm going
to put out another release end of November or beginning of December I'd like
to add something new as well as all of the bug fixes. Now that the buffer work
has been done I thought I'd add some colour - especially as people keep asking
for colours.

WolfMUD already has (unused) support for colours. For example:


  s.msg.Actor.Send(text.Red, "You can't get the fireplace.")
  s.msg.Actor.Send(text.Green, "You get the box.")
  s.msg.Actor.Send(text.Yellow, "You see Diddymus get a box.")


Would the last message above, in yellow, be visible to the user? If they have
a dark background then yes, if they have a light background then probably not.

It would be possible to ask the user when they login if they are using a light
or dark theme and display colours appropriately. But then you can't simply use
constants like text.Yellow.

WolfMUD has three basic message types:

  red - something negative happened
  yellow - something neutral happened (informational messages)
  green - something positive happened

So I could add pseudo colours like text.Bad, text.Info, text.Good. But I would
still need a way of setting them based on player preferences. It could be done
with methods: text.Bad(), text.Info() and text.Good() which query the player's
preferences - but I don't want the text package to depend on other packages. I
did think of adding some helper methods to buffers: SendBad(), SendInfo(),
SendGood(). But is buffers the right place to add this? This also has a
definite whiff of "package pollution" about it.

It seems overkill and hassle to start adding methods when text.Red, text.Green
and text.Yellow is such a simple and elegant solution.

The alternative is to assume either a light or dark background for everyone :(

This has made me think more about this site as well. Would people prefer a
dark theme instead of the current light theme? I could do both and add a theme
switcher, but I'd rather not add JavaScript and cookies[1] just for themes.

So what do you think? What's your preference? Light or dark backgrounds? Drop
me an email with your comments as I'd love to hear what other people think.
Otherwise I'm going to have to make a personal, arbitrary decision on this.

                             diddymus@wolfmud.org

--
Diddymus

  [1] Native support for choosing alternate stylesheets is quite poor.


  Up to Main Index                          Up to Journal for November, 2016