Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # TheoAllen - Custom Text Color
- # Version : 1.0
- # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
- # (English Documentation)
- # =============================================================================
- ($imported ||={})[:Theo_TextColor] = true
- # =============================================================================
- # CHANGE LOGS:
- # -----------------------------------------------------------------------------
- # 2013.06.29 - Finished snippet
- # =============================================================================
- =begin
- Introduction :
- This script is simply add more color choice in color escape command. By
- default, RMVXA just provided text color codes from 0 until 31.
- How to use :
- Put this script below material but above main.
- Edit the editable region.
- Use color escape command to change the color. For example :
- \C[50]
- The number 50, must exist in the editable region
- Terms of use :
- This just a simple snippet. You're free to edit by your own. Credit isn't
- necessary. But I will be thankful if you put my name in your credit list.
- Free for commercial and non-commercial purposes
- =end
- # =============================================================================
- # Editable region :
- # =============================================================================
- module THEO
- module COLOR
- ID = {
- # id => Color.new(red,green,blue),
- 32 => Color.new(255, 255, 255),
- 33 => Color.new(128, 128, 128),
- 34 => Color.new( 0, 255, 255),
- 35 => Color.new(255, 0, 255),
- 36 => Color.new(255, 255, 0),
- # Remember. The maximal value of each color is 255
- } # <-- Don't touch this
- end
- end
- # =============================================================================
- # End of editable region
- # =============================================================================
- class Window_Base < Window
- alias ori_text_color text_color
- def text_color(n)
- return ori_text_color(n) if n < 32
- return THEO::COLOR::ID[n] rescue normal_color
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment