• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Alternative \c[x] text colors

Alternative \c[x] text colors All

Pokémon Essentials Version
Non-applicable
Description

In messages, you can type in \c[x] (where x is some number between 0 and 8 inclusive) to turn the text after that a different colour. Those colours, unfortunately, aren't the best and they're not easy to work with (as of v17.2).

This resource is a rewrite of the method which generates these colours. It has these results:
  • The colour codes are now easier to work with, as they are in standard RGB format rather than the fiddly 15-bit four-digit format.
  • The existing colour shades have been tweaked and improved.
  • Four new colours have been added (\c[9] through \c[12]).
  • Improved support for dark windowskins, as now the base and shadow colours are swapped for dark backgrounds, making them look a bit nicer.
Here are the available colours:

Untitled.png

  • 0 = Default colour
  • 1 = Blue
  • 2 = Red
  • 3 = Green
  • 4 = Cyan
  • 5 = Magenta
  • 6 = Yellow
  • 7 = Grey
  • 8 = White
  • 9 = Purple
  • 10 = Orange
  • 11 = Dark text
  • 12 = Light text
Installation

To make use of this resource, simply locate def getSkinColor and replace it with the code below.
Ruby:
def getSkinColor(windowskin,color,isDarkSkin)
  if !windowskin || windowskin.disposed? ||
     windowskin.width!=128 || windowskin.height!=128
    # Base color, shadow color (these are reversed on dark windowskins)
    textcolors = [
       "0070F8","78B8E8",   # 1  Blue
       "E82010","F8A8B8",   # 2  Red
       "60B048","B0D090",   # 3  Green
       "48D8D8","A8E0E0",   # 4  Cyan
       "D038B8","E8A0E0",   # 5  Magenta
       "E8D020","F8E888",   # 6  Yellow
       "A0A0A8","D0D0D8",   # 7  Grey
       "F0F0F8","C8C8D0",   # 8  White
       "9040E8","B8A8E0",   # 9  Purple
       "F89818","F8C898",   # 10 Orange
       colorToRgb32(MessageConfig::DARKTEXTBASE),
          colorToRgb32(MessageConfig::DARKTEXTSHADOW),   # 11 Dark gray text
       colorToRgb32(MessageConfig::LIGHTTEXTBASE),
          colorToRgb32(MessageConfig::LIGHTTEXTSHADOW)   # 12 White text
    ]
    if color==0 || color>textcolors.length/2   # No special colour, use default
      if isDarkSkin   # Dark background, light text
        return shadowc3tag(MessageConfig::LIGHTTEXTBASE,MessageConfig::LIGHTTEXTSHADOW)
      end
      # Light background, dark text
      return shadowc3tag(MessageConfig::DARKTEXTBASE,MessageConfig::DARKTEXTSHADOW)
    end
    # Special colour as listed above
    if isDarkSkin   # Dark background, light text
      return sprintf("<c3=%s,%s>",textcolors[2*(color-1)+1],textcolors[2*(color-1)])
    end
    # Light background, dark text
    return sprintf("<c3=%s,%s>",textcolors[2*(color-1)],textcolors[2*(color-1)+1])
  else   # VX windowskin
    color = 0 if color>=32
    x = 64 + (color % 8) * 8
    y = 96 + (color / 8) * 8
    pixel = windowskin.get_pixel(x, y)
    return shadowctagFromColor(pixel)
  end
end

Notes

This resource's code is taken from Essentials v18.

The previous version of this resource used the following colours, which are more vibrant than the colours above:
Ruby:
       "1880F8","B0C0F8",   # 1  Blue
       "F83018","F8B0A0",   # 2  Red
       "18C020","A8E8A8",   # 3  Green
       "40C0D0","A8E0E8",   # 4  Cyan
       "D030C0","E8B0D8",   # 5  Magenta
       "E0D820","F8F0A8",   # 6  Yellow
       "98A0B0","D0D0D8",   # 7  Grey
       "F0F0F0","C0C0C0",   # 8  White
       "9018F8","D0A0F0",   # 9  Purple
       "F89810","F8D0A0",   # 10 Orange
       "A0D0F8","D8E0F8",   # 11 Light Blue
       "F8A8D8","F0D8E0"    # 12 Pink
Untitled.png

For reference, the shades in older versions of Essentials are:
Ruby:
       "8080F8","4040B8",   # 1 Blue
       "F88080","B84040",   # 2 Red
       "80F880","40B840",   # 3 Green
       "80F8F8","40B8B8",   # 4 Cyan
       "F880F8","B840B8",   # 5 Magenta
       "F8F880","B8B840",   # 6 Yellow
       "C0C0C0","808080",   # 7 Grey
       "F8F8F8","B8B8B8"    # 8 White
Untitled.png


See also

The resource Improved Colored Text also provides alternate text colours. You can take the colour codes from that resource and put them into this resource's code if you want - just be careful to take only the colour codes themselves and not the <c3= and > parts.

Version history

1. Created 2018-11-03.
2. Updated 2020-03-06.
Credits
None needed
Author
Maruno
Views
4,269
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Maruno

Latest updates

  1. Update

    Updated the colours to the ones used in Essentials v18. Updated images showing all other colours...
Back
Top