#============================================================================== # * COLOR BASE Public Port # * Version: BETA 3.74 # * Author: Matt Sully (Gump) # # > Modules: CCB, COLOR_BASE # # * INFORMATION #----------------------------- # > Intended to be used as a fast way to access a variety of colors # > Use CCB.get('Color_Name') or CCB.get(@stng) if @stng is a 'ColorName' string. # > CCB.g is a shortcut for CCB.get # > Invalid selections will return default text color. see the color dictionary # for all definitions , which have strings for you to use(scroll down). # > Valid selections include 'strings' and integers such as 0 or 24 or 8. See # the dictionary for all defintions. # > Adding your own colors is easy assuming you have a basic understanding of # Ruby. You have to add their constant color var in COLOR_BASE, then add their # definition(s) in the color_dictionary. If you dont add your new colors to the # dictionary, you'll need to reference them directly via 'COLOR_BASE::Color'. # The easiest way to add new colors to the dictionary that are quick to access # is to add integer definitions. # > All current methodology within the script will be retained in later versions, # new methods or things may be added but all the old methods will be saved to # maintain compatibility. # > NEW COMMAND: CCB.ary(color1, color2). Returns a 2 color array, intended to # be color1 = textcolor and color2 = text outline color, but it could be used # to fetch any 2 colors you want. # > NEW COMMAND: CCB.multi(color_array). Returns a multi color array (any amount # of colors, as many as you call it with). Must be called with an array of # definitions. # # > All methods(commands) have default values that they will return if they are # not called with a color definition. The dictionary also has an 'invalid' color # it will return if any of the definitions you try to call CCB with aren't found. # # # * SAMPLE USAGE #----------------------------- # *Sample text color + outline color change: # > self.contents.font.color = CCB.g('Fire') # you can use a string definition # > self.contents.font.out_color = CCB.g(11) # or an integer definiton # > self.contents.font.color = CCB.g('5') # or an integer in a string, which is # # also a valid definition # # * LEGAL CRAP #----------------------------- # > You may modify this script however you want # > You may freely use this script in any free or commerical game # > You may include this script with your own script releases # > Providing Credit for usage of this script is OPTIONAL, but appreciated #============================================================================== ############################## # Command Color Base Module ############################## module CCB def self.get(color='FullRed') selcol = COLOR_BASE.sel_color(color) return selcol end def self.g(color='FullRed') selcol = self.get(color) return selcol end def self.ary(color='Default_Text', color_out='Default_Outline') col1 = self.get(color) col2 = self.get(color_out) retval = [col1, col2] return retval end def self.multi(color_ary=['FullRed', 'FullBlue', 'FullGreen']) index = 0 for i in 0...color_ary.size col = color_ary[index] fetcher = self.get(col) retval << fetcher index += 1 end return retval end end ############################## # Color Base Module ############################## module COLOR_BASE #=========================================== # * Color Constants #=========================================== Default_Outline = Color.new(0, 0, 0, 128) #origonal text outline color Default_Text = Color.new(255, 255, 255, 255) #origonal color Phys_Outline = Color.new(192, 192, 192, 158) #phys. outline Items_Outline = Color.new(132, 108, 8, 224) #items Exp_Outline = Color.new(4, 4, 116, 232) #exp Money_Outline = Color.new(0, 116, 0, 232) #money Profile = Color.new(216, 216, 255, 255) #profile label outline Active_Party = Color.new(216, 216, 255, 128) #active party label outline Quest = Color.new(232, 232, 232, 216) #quest label outline Emblem = Color.new(255, 226, 128, 152) #emblem name outline QFeedback_Out = Color.new(192, 192, 192, 192) #feedback label outline Fire = Color.new(255, 64, 64, 255) #fire Ice = Color.new(178, 178, 255, 255) #ice Thunder = Color.new(255, 216, 96, 255) #thunder Thunder2 = Color.new(255, 216, 96, 164) #thunder2 (transparent) Water = Color.new(96, 96, 255, 255) #water Earth = Color.new(80, 255, 80, 255) #earth Earth2 = Color.new(80, 255, 80, 164) #earth2 (transparent) Dark = Color.new(64, 64, 64, 255) #dark FullRed = Color.new(255, 0, 0, 255) #full red FullGreen = Color.new(0, 255, 0, 255) #full green FullBlue = Color.new(0, 0, 255, 255) #full blue FullYellow = Color.new(255, 255, 0, 255) #full yellow Yellow2 = Color.new(196, 196, 0, 226) #yellow 2 Green2 = Color.new(0, 196, 0, 226) #green 2 #GTBS Colors by GubiD RED = Color.new(255,0,0,255) BLUE = Color.new(0,0,255,255) GREEN = Color.new(0,255,0,255) YELLOW = Color.new(255,255,0,255) PURPLE = Color.new(128,0,255,255) ORANGE = Color.new(255,128,0,255) BROWN = Color.new(128,64,0,255) BLACK = Color.new(0,0,0,255) WHITE = Color.new(255,255,255,255) PINK = Color.new(255,128,255,255) TAN = Color.new(200,200,110,255) #=========================================== # * COLOR_BASE Methods #=========================================== def self.sel_color(color) selcol = self.color_dictionary(color) return selcol end #----------------------------------- # * Color Dictionary #----------------------------------- def self.color_dictionary(color) case color #--------------------- # Full Name Definitions #--------------------- when 'Default_Outline'; return Default_Outline when 'Default_Text'; return Default_Text when 'Phys_Outline'; return Phys_Outline when 'Items_Outline'; return Items_Outline when 'Exp_Outline'; return Exp_Outline when 'Money_Outline'; return Money_Outline when 'Profile'; return Profile when 'Emblem'; return Emblem when 'Fire'; return Fire when 'Ice'; return Ice when 'Thunder'; return Thunder when 'Thunder2'; return Thunder2 when 'Water'; return Water when 'Earth'; return Earth when 'Earth2'; return Earth2 when 'Dark'; return Dark when 'FullRed'; return FullRed when 'FullGreen'; return FullGreen when 'FullBlue'; return FullBlue when 'FullYellow'; return FullYellow when 'Yellow2'; return Yellow2 when 'Green2'; return Green2 when 'Active_Party'; return Active_Party when 'Quest'; return Quest when 'Quest_Outline'; return QFeedback_Out when 'RED'; return RED when 'BLUE'; return BLUE when 'GREEN'; return GREEN when 'YELLOW'; return YELLOW when 'PURPLE'; return PURPLE when 'ORANGE'; return ORANGE when 'BROWN'; return BROWN when 'BLACK'; return BLACK when 'WHITE'; return WHITE when 'PINK'; return PINK when 'TAN'; return TAN #--------------------- # Short Name Definitions #--------------------- when 'defout'; return Default_Outline when 'deftxt'; return Default_Text #--------------------- # Numerical String & Integer Definitions #--------------------- when '0'; return Default_Outline when '1'; return Default_Text when '2'; return Phys_Outline when '3'; return Items_Outline when '4'; return Exp_Outline when '5'; return Money_Outline when '6'; return Profile when '7'; return Emblem when '8'; return Fire when '9'; return Ice when '10'; return Thunder when '11'; return Thunder2 when '12'; return Water when '13'; return Earth when '14'; return Earth2 when '15'; return Dark when '16'; return FullRed when '17'; return FullGreen when '18'; return FullBlue when '19'; return FullYellow when '20'; return Yellow2 when '21'; return Green2 when '22'; return Active_Party when '23'; return RED when '24'; return BLUE when '25'; return GREEN when '26'; return YELLOW when '27'; return PURPLE when '28'; return ORANGE when '29'; return BROWN when '30'; return BLACK when '31'; return WHITE when '32'; return PINK when '33'; return TAN when '34'; return Quest when '35'; return QFeedback_Out when 0; return Default_Outline when 1; return Default_Text when 2; return Phys_Outline when 3; return Items_Outline when 4; return Exp_Outline when 5; return Money_Outline when 6; return Profile when 7; return Emblem when 8; return Fire when 9; return Ice when 10; return Thunder when 11; return Thunder2 when 12; return Water when 13; return Earth when 14; return Earth2 when 15; return Dark when 16; return FullRed when 17; return FullGreen when 18; return FullBlue when 19; return FullYellow when 20; return Yellow2 when 21; return Green2 when 22; return Active_Party when 23; return RED when 24; return BLUE when 25; return GREEN when 26; return YELLOW when 27; return PURPLE when 28; return ORANGE when 29; return BROWN when 30; return BLACK when 31; return WHITE when 32; return PINK when 33; return TAN when 34; return Quest when 35; return QFeedback_Out #--------------------- # Invalid Definiton color #--------------------- else; return Default_Text #--------------------- # END OF DICTIONARY #--------------------- end end end