Save-Point
Hex Color Codes in Messages - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+--- Thread: Hex Color Codes in Messages (/thread-2745.html)



Hex Color Codes in Messages - RPG Advocate - 03-03-2008

Hex Color Codes in Messages
by RPG Advocate
saved from Phylomortis.Com


Introduction
This script allows you to enter a six-character hex value when using the "\c" control code in messages, while still allowing you to use the numbered reference colors (\c[0[ - \c[7]) by default). To do this, use the \c control code as normal, but within the brackets, put the character "x" followed by the hex code. For instance, the syntax for red would be \c[xFF0000]. Be careful, though. If you enter a hex string that isn't six characters long, white text will be used. If you enter a malformed string, such as \c[D49], then reference color 0 will be used. Note that letters for hex values A-F must be capital letters.

To use this script, replace the parts of Window_Message shown in the first spoiler (the first part replaces a single statement and the second part replaces a block, as shown in the comments). Then, add the second part (in the second spoiler) that adds the hex_color and hex_convert methods into Window_Base. This script will work with my Custom Text Command script.


Script

Hex Code (part 1)

Hex Code (part 2)