Kingdom Ablaze
Sponsor
i re-wrote Window_Base to have 216 colors, do you think anyone would use it? here is the palette i used:
 def text_color(n)
  case n
  when 0
   return Color.new(255, 255, 255, 255)
  when 1
   return Color.new(128, 128, 255, 255)
  when 2
   return Color.new(255, 128, 128, 255)
  when 3
   return Color.new(128, 255, 128, 255)
  when 4
   return Color.new(128, 255, 255, 255)
  when 5
   return Color.new(255, 128, 255, 255)
  when 6
   return Color.new(255, 255, 128, 255)
  when 7
   return Color.new(192, 192, 192, 255)
  else
   normal_color
  end
 end
Â
class Window_Base
 Test_Colors = {}
 Test_Colors[1] = Color.new(255, 255, 255, 255)
 Test_Colors[2] = Color.new(128, 128, 255, 255)
 # ...
 Test_Colors.default = Color.new(255, 255, 255, 255)
 def text_color(n)
  return Test_Colors[n]
 end
end
Â
class Window_Base
 @@text_color_cache = {}
 Test_Colors = {}
 Test_Colors[1] = [255, 255, 255, 255]
 Test_Colors[2] = [128, 128, 255, 255]
 # ...
 Test_Colors.default = [255, 255, 255, 255]
 def text_color(n)
  unless @@text_color_cache.has_key?(n)
   @@text_color_cache[n] = Color.new(*Test_Colors[n])
  end
  return @@text_color_cache[n]
 end
end
def text_color(n)
# If color not created yet
unless @@text_color_cache.has_key?(n)
# Save color to cache
@@text_color_cache[n] = Color.new(*Test_Colors[n])
end
# Return saved color
return @@text_color_cache[n]
end
def normal_color
return Color.new(Plague180_Color::Normal_Color)
#==============================================================================
# ** Window_Base
#This class was re-written by plague180 to include 216 colors.
#Special thanks to SephirothSpawn for exsplaining how to set up the cache.
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
#Go to line 234 to configure.
class Window_Base
@@text_color_cache = {}
Test_Colors = {}
Test_Colors[1] = [0, 0, 0]
Test_Colors[2] = [51, 0, 0]
Test_Colors[3] = [102, 0, 0]
Test_Colors[4] = [153, 0, 0]
Test_Colors[5] = [204, 0, 0]
Test_Colors[6] = [255, 0, 0]
Test_Colors[7] = [0, 51, 0]
Test_Colors[8] = [51, 51, 0]
Test_Colors[9] = [102, 51, 0]
Test_Colors[10] = [153, 51, 0]
Test_Colors[11] = [204, 51, 0]
Test_Colors[12] = [255, 51, 0]
Test_Colors[13] = [0, 102, 0]
Test_Colors[14] = [51, 102, 0]
Test_Colors[15] = [102, 102, 0]
Test_Colors[16] = [153, 102, 0]
Test_Colors[17] = [204, 102, 0]
Test_Colors[18] = [255, 102, 0]
Test_Colors[19] = [0, 153, 0]
Test_Colors[20] = [51, 153, 0]
Test_Colors[21] = [102, 153, 0]
Test_Colors[22] = [153, 153, 0]
Test_Colors[23] = [204, 153, 0]
Test_Colors[24] = [255, 153, 0]
Test_Colors[25] = [0, 204, 0]
Test_Colors[26] = [51, 204, 0]
Test_Colors[27] = [102, 204, 0]
Test_Colors[28] = [153, 204, 0]
Test_Colors[29] = [204, 204, 0]
Test_Colors[30] = [255, 204, 0]
Test_Colors[31] = [0, 255, 0]
Test_Colors[32] = [51, 255, 0]
Test_Colors[33] = [102, 255, 0]
Test_Colors[34] = [153, 255, 0]
Test_Colors[35] = [204, 255, 0]
Test_Colors[36] = [255, 255, 0]
Test_Colors[37] = [0, 0, 51]
Test_Colors[38] = [51, 0, 51]
Test_Colors[39] = [102, 0, 51]
Test_Colors[40] = [153, 0, 51]
Test_Colors[41] = [204, 0, 51]
Test_Colors[42] = [255, 0, 51]
Test_Colors[43] = [0, 51, 51]
Test_Colors[44] = [51, 51, 51]
Test_Colors[45] = [102, 51, 51]
Test_Colors[46] = [153, 51, 51]
Test_Colors[47] = [204, 51, 51]
Test_Colors[48] = [255, 51, 51]
Test_Colors[49] = [0, 102, 51]
Test_Colors[50] = [51, 102, 51]
Test_Colors[51] = [102, 102, 51]
Test_Colors[52] = [153, 102, 51]
Test_Colors[53] = [204, 102, 51]
Test_Colors[54] = [255, 102, 51]
Test_Colors[55] = [0, 153, 51]
Test_Colors[56] = [51, 153, 51]
Test_Colors[57] = [102, 153, 51]
Test_Colors[58] = [153, 153, 51]
Test_Colors[59] = [204, 153, 51]
Test_Colors[60] = [255, 153, 51]
Test_Colors[61] = [0, 204, 51]
Test_Colors[62] = [51, 204, 51]
Test_Colors[63] = [102, 204, 51]
Test_Colors[64] = [153, 204, 51]
Test_Colors[65] = [204, 204, 51]
Test_Colors[66] = [255, 204, 51]
Test_Colors[67] = [0, 255, 51]
Test_Colors[68] = [51, 255, 51]
Test_Colors[69] = [102, 255, 51]
Test_Colors[70] = [153, 255, 51]
Test_Colors[71] = [204, 255, 51]
Test_Colors[72] = [255, 255, 51]
Test_Colors[73] = [0, 0, 102]
Test_Colors[74] = [51, 0, 102]
Test_Colors[75] = [102, 0, 102]
Test_Colors[76] = [153, 0, 102]
Test_Colors[77] = [204, 0, 102]
Test_Colors[78] = [255, 0, 102]
Test_Colors[79] = [0, 51, 102]
Test_Colors[80] = [51, 51, 102]
Test_Colors[81] = [102, 51, 102]
Test_Colors[82] = [153, 51, 102]
Test_Colors[83] = [204, 51, 102]
Test_Colors[84] = [255, 51, 102]
Test_Colors[85] = [0, 102, 102]
Test_Colors[86] = [51, 102, 102]
Test_Colors[87] = [102, 102, 102]
Test_Colors[88] = [153, 102, 102]
Test_Colors[89] = [204, 102, 102]
Test_Colors[90] = [255, 102, 102]
Test_Colors[91] = [0, 153, 102]
Test_Colors[92] = [51, 153, 102]
Test_Colors[93] = [102, 153, 102]
Test_Colors[94] = [153, 153, 102]
Test_Colors[95] = [204, 153, 102]
Test_Colors[96] = [255, 153, 102]
Test_Colors[97] = [0, 204, 102]
Test_Colors[98] = [51, 204, 102]
Test_Colors[99] = [102, 204, 102]
Test_Colors[100] = [153, 204, 102]
Test_Colors[101] = [204, 204, 102]
Test_Colors[102] = [255, 204, 102]
Test_Colors[103] = [0, 255, 102]
Test_Colors[104] = [51, 255, 102]
Test_Colors[105] = [102, 255, 102]
Test_Colors[106] = [153, 255, 102]
Test_Colors[107] = [204, 255, 102]
Test_Colors[108] = [255, 255, 102]
Test_Colors[109] = [0, 0, 153]
Test_Colors[110] = [51, 0, 153]
Test_Colors[111] = [102, 0, 153]
Test_Colors[112] = [153, 0, 153]
Test_Colors[113] = [204, 0, 153]
Test_Colors[114] = [255, 0, 153]
Test_Colors[115] = [0, 51, 153]
Test_Colors[116] = [51, 51, 153]
Test_Colors[117] = [102, 51, 153]
Test_Colors[118] = [153, 51, 153]
Test_Colors[119] = [204, 51, 153]
Test_Colors[120] = [255, 51, 153]
Test_Colors[121] = [0, 102, 153]
Test_Colors[122] = [51, 102, 153]
Test_Colors[123] = [102, 102, 153]
Test_Colors[124] = [153, 102, 153]
Test_Colors[125] = [204, 102, 153]
Test_Colors[126] = [255, 102, 153]
Test_Colors[127] = [0, 153, 153]
Test_Colors[128] = [51, 153, 153]
Test_Colors[129] = [102, 153, 153]
Test_Colors[130] = [153, 153, 153]
Test_Colors[131] = [204, 153, 153]
Test_Colors[132] = [255, 153, 153]
Test_Colors[133] = [0, 204, 153]
Test_Colors[134] = [51, 204, 153]
Test_Colors[135] = [102, 204, 153]
Test_Colors[136] = [153, 204, 153]
Test_Colors[137] = [204, 204, 153]
Test_Colors[138] = [255, 204, 153]
Test_Colors[139] = [0, 255, 153]
Test_Colors[140] = [51, 255, 153]
Test_Colors[141] = [102, 255, 135]
Test_Colors[142] = [153, 255, 153]
Test_Colors[143] = [204, 255, 153]
Test_Colors[144] = [255, 255, 153]
Test_Colors[145] = [0, 0, 204]
Test_Colors[146] = [51, 0, 204]
Test_Colors[147] = [102, 0, 204]
Test_Colors[148] = [153, 0, 204]
Test_Colors[149] = [204, 0, 204]
Test_Colors[150] = [255, 0, 204]
Test_Colors[151] = [0, 51, 204]
Test_Colors[152] = [51, 51, 204]
Test_Colors[153] = [102, 51, 204]
Test_Colors[154] = [153, 51, 204]
Test_Colors[155] = [204, 51, 204]
Test_Colors[156] = [255, 51, 204]
Test_Colors[157] = [0, 102, 204]
Test_Colors[158] = [51, 102, 204]
Test_Colors[159] = [102, 102, 204]
Test_Colors[160] = [153, 102, 204]
Test_Colors[161] = [204, 102, 204]
Test_Colors[162] = [255, 102, 204]
Test_Colors[163] = [0, 153, 204]
Test_Colors[164] = [51, 153, 204]
Test_Colors[165] = [102, 153, 204]
Test_Colors[166] = [153, 153, 204]
Test_Colors[167] = [204, 153, 204]
Test_Colors[168] = [255, 153, 204]
Test_Colors[169] = [0, 204, 204]
Test_Colors[170] = [51, 204, 204]
Test_Colors[171] = [102, 204, 204]
Test_Colors[172] = [153, 204, 204]
Test_Colors[173] = [204, 204, 204]
Test_Colors[174] = [255, 204, 204]
Test_Colors[175] = [0, 255, 204]
Test_Colors[176] = [51, 255, 204]
Test_Colors[177] = [102, 255, 204]
Test_Colors[178] = [153, 255, 204]
Test_Colors[179] = [204, 255, 204]
Test_Colors[180] = [255, 255, 204]
Test_Colors[181] = [0, 0, 255]
Test_Colors[182] = [51, 0, 255]
Test_Colors[183] = [102, 0, 255]
Test_Colors[184] = [153, 0, 255]
Test_Colors[185] = [204, 0, 255]
Test_Colors[186] = [255, 0, 255]
Test_Colors[187] = [0, 51, 255]
Test_Colors[188] = [51, 51, 255]
Test_Colors[189] = [102, 51, 255]
Test_Colors[190] = [153, 51, 255]
Test_Colors[191] = [204, 51, 255]
Test_Colors[192] = [255, 51, 255]
Test_Colors[193] = [0, 102, 255]
Test_Colors[194] = [51, 102, 255]
Test_Colors[195] = [102, 102, 255]
Test_Colors[196] = [153, 102, 255]
Test_Colors[197] = [204, 102, 255]
Test_Colors[198] = [255, 102, 255]
Test_Colors[199] = [0, 153, 255]
Test_Colors[200] = [51, 153, 255]
Test_Colors[201] = [102, 153, 255]
Test_Colors[202] = [153, 153, 255]
Test_Colors[203] = [204, 153, 255]
Test_Colors[204] = [255, 153, 255]
Test_Colors[205] = [0, 204, 255]
Test_Colors[206] = [51, 204, 25]
Test_Colors[207] = [102, 204, 255]
Test_Colors[208] = [153, 204, 255]
Test_Colors[209] = [204, 204, 255]
Test_Colors[210] = [255, 204, 255]
Test_Colors[211] = [0, 255, 255]
Test_Colors[212] = [51, 255, 255]
Test_Colors[213] = [102, 255, 255]
Test_Colors[214] = [153, 255, 255]
Test_Colors[215] = [204, 255, 255]
Test_Colors[216] = [255, 255, 255]
Test_Colors.default = [255, 255, 255, 255]
#------------------------------------------------------------------------------
#To configure you can either change the numerical values or point it towards
#one of the Test_Colors e.g:
#Normanl_Color = Test_Colors[210]
module Plague180_Color
Normal_Color = [255, 255, 255, 255]
Disabled_Color = [255, 255, 255, 128]
System_Color = [192, 224, 255, 255]
Crisis_Color = [255, 255, 64, 255]
Knockout_Color = [255, 64, 0, 255]
end
#-----------------------------------------------------------------------------
#--------------------------------------------------------------------------
# * Get Text Color
# n : text color number (0-7)
#--------------------------------------------------------------------------
def text_color(n)
# If color not created yet
unless @@text_color_cache.has_key?(n)
# Save color to cache
@@text_color_cache[n] = Color.new(*Test_Colors[n])
end
# Return saved color
return @@text_color_cache[n]
end
#--------------------------------------------------------------------------
# * Get Normal Text Color
#--------------------------------------------------------------------------
def normal_color
return Color.new(*Plague180_Color::Normal_Color)
end
#--------------------------------------------------------------------------
# * Get Disabled Text Color
#--------------------------------------------------------------------------
def disabled_color
return Color.new(*Plague180_Color::Disabled_Color)
end
#--------------------------------------------------------------------------
# * Get System Text Color
#--------------------------------------------------------------------------
def system_color
return Color.new(*Plague180_Color::System_Color)
end
#--------------------------------------------------------------------------
# * Get Crisis Text Color
#--------------------------------------------------------------------------
def crisis_color
return Color.new(*Plague180_Color::Crisis_Color)
end
#--------------------------------------------------------------------------
# * Get Knockout Text Color
#--------------------------------------------------------------------------
def knockout_color
return Color.new(*Plague180_Color::Kockout_Color)
end
end
module Plague180_Color
# Color definition goes here
@cache = {}
def self.get_color(id)
unless @cache.has_key?(id)
@cache[id] = Color.new(*Text_Colors[id])
end
return @cache[id]
end
end
end
class Window_Base
def text_color(n)
return Plague180_Color.get_color(n)
end
def normal_color
return Plague180_Color.get_color('normal')
end
# ...
end
#==============================================================================
# ** Window_Base
#This class was re-written by plague180 to include 216 colors.
#Special thanks to SephirothSpawn for exsplaining how to set up the cache.
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
module Plague180_Color
#To configure you can either change the numerical values or point it towards
#one of the Test_Colors e.g:
#Normanl_Color = Test_Colors[210]
Normal_Color = [255, 255, 255, 255]
Disabled_Color = [255, 255, 255, 128]
System_Color = [192, 224, 255, 255]
Crisis_Color = [255, 255, 64, 255]
Knockout_Color = [255, 64, 0, 255]
#------------------------------------------------------------------------------
@@text_color_cache = {}
Test_Colors = {}
Test_Colors['normal'] = Normal_Color
Test_Colors['disabled'] = Disabled_Color
Test_Colors['system'] = System_Color
Test_Colors['crisis'] = Crisis_Color
Test_Colors['knockout'] = Knockout_Color
Test_Colors[1] = [0, 0, 0]
Test_Colors[2] = [51, 0, 0]
Test_Colors[3] = [102, 0, 0]
Test_Colors[4] = [153, 0, 0]
Test_Colors[5] = [204, 0, 0]
Test_Colors[6] = [255, 0, 0]
Test_Colors[7] = [0, 51, 0]
Test_Colors[8] = [51, 51, 0]
Test_Colors[9] = [102, 51, 0]
Test_Colors[10] = [153, 51, 0]
Test_Colors[11] = [204, 51, 0]
Test_Colors[12] = [255, 51, 0]
Test_Colors[13] = [0, 102, 0]
Test_Colors[14] = [51, 102, 0]
Test_Colors[15] = [102, 102, 0]
Test_Colors[16] = [153, 102, 0]
Test_Colors[17] = [204, 102, 0]
Test_Colors[18] = [255, 102, 0]
Test_Colors[19] = [0, 153, 0]
Test_Colors[20] = [51, 153, 0]
Test_Colors[21] = [102, 153, 0]
Test_Colors[22] = [153, 153, 0]
Test_Colors[23] = [204, 153, 0]
Test_Colors[24] = [255, 153, 0]
Test_Colors[25] = [0, 204, 0]
Test_Colors[26] = [51, 204, 0]
Test_Colors[27] = [102, 204, 0]
Test_Colors[28] = [153, 204, 0]
Test_Colors[29] = [204, 204, 0]
Test_Colors[30] = [255, 204, 0]
Test_Colors[31] = [0, 255, 0]
Test_Colors[32] = [51, 255, 0]
Test_Colors[33] = [102, 255, 0]
Test_Colors[34] = [153, 255, 0]
Test_Colors[35] = [204, 255, 0]
Test_Colors[36] = [255, 255, 0]
Test_Colors[37] = [0, 0, 51]
Test_Colors[38] = [51, 0, 51]
Test_Colors[39] = [102, 0, 51]
Test_Colors[40] = [153, 0, 51]
Test_Colors[41] = [204, 0, 51]
Test_Colors[42] = [255, 0, 51]
Test_Colors[43] = [0, 51, 51]
Test_Colors[44] = [51, 51, 51]
Test_Colors[45] = [102, 51, 51]
Test_Colors[46] = [153, 51, 51]
Test_Colors[47] = [204, 51, 51]
Test_Colors[48] = [255, 51, 51]
Test_Colors[49] = [0, 102, 51]
Test_Colors[50] = [51, 102, 51]
Test_Colors[51] = [102, 102, 51]
Test_Colors[52] = [153, 102, 51]
Test_Colors[53] = [204, 102, 51]
Test_Colors[54] = [255, 102, 51]
Test_Colors[55] = [0, 153, 51]
Test_Colors[56] = [51, 153, 51]
Test_Colors[57] = [102, 153, 51]
Test_Colors[58] = [153, 153, 51]
Test_Colors[59] = [204, 153, 51]
Test_Colors[60] = [255, 153, 51]
Test_Colors[61] = [0, 204, 51]
Test_Colors[62] = [51, 204, 51]
Test_Colors[63] = [102, 204, 51]
Test_Colors[64] = [153, 204, 51]
Test_Colors[65] = [204, 204, 51]
Test_Colors[66] = [255, 204, 51]
Test_Colors[67] = [0, 255, 51]
Test_Colors[68] = [51, 255, 51]
Test_Colors[69] = [102, 255, 51]
Test_Colors[70] = [153, 255, 51]
Test_Colors[71] = [204, 255, 51]
Test_Colors[72] = [255, 255, 51]
Test_Colors[73] = [0, 0, 102]
Test_Colors[74] = [51, 0, 102]
Test_Colors[75] = [102, 0, 102]
Test_Colors[76] = [153, 0, 102]
Test_Colors[77] = [204, 0, 102]
Test_Colors[78] = [255, 0, 102]
Test_Colors[79] = [0, 51, 102]
Test_Colors[80] = [51, 51, 102]
Test_Colors[81] = [102, 51, 102]
Test_Colors[82] = [153, 51, 102]
Test_Colors[83] = [204, 51, 102]
Test_Colors[84] = [255, 51, 102]
Test_Colors[85] = [0, 102, 102]
Test_Colors[86] = [51, 102, 102]
Test_Colors[87] = [102, 102, 102]
Test_Colors[88] = [153, 102, 102]
Test_Colors[89] = [204, 102, 102]
Test_Colors[90] = [255, 102, 102]
Test_Colors[91] = [0, 153, 102]
Test_Colors[92] = [51, 153, 102]
Test_Colors[93] = [102, 153, 102]
Test_Colors[94] = [153, 153, 102]
Test_Colors[95] = [204, 153, 102]
Test_Colors[96] = [255, 153, 102]
Test_Colors[97] = [0, 204, 102]
Test_Colors[98] = [51, 204, 102]
Test_Colors[99] = [102, 204, 102]
Test_Colors[100] = [153, 204, 102]
Test_Colors[101] = [204, 204, 102]
Test_Colors[102] = [255, 204, 102]
Test_Colors[103] = [0, 255, 102]
Test_Colors[104] = [51, 255, 102]
Test_Colors[105] = [102, 255, 102]
Test_Colors[106] = [153, 255, 102]
Test_Colors[107] = [204, 255, 102]
Test_Colors[108] = [255, 255, 102]
Test_Colors[109] = [0, 0, 153]
Test_Colors[110] = [51, 0, 153]
Test_Colors[111] = [102, 0, 153]
Test_Colors[112] = [153, 0, 153]
Test_Colors[113] = [204, 0, 153]
Test_Colors[114] = [255, 0, 153]
Test_Colors[115] = [0, 51, 153]
Test_Colors[116] = [51, 51, 153]
Test_Colors[117] = [102, 51, 153]
Test_Colors[118] = [153, 51, 153]
Test_Colors[119] = [204, 51, 153]
Test_Colors[120] = [255, 51, 153]
Test_Colors[121] = [0, 102, 153]
Test_Colors[122] = [51, 102, 153]
Test_Colors[123] = [102, 102, 153]
Test_Colors[124] = [153, 102, 153]
Test_Colors[125] = [204, 102, 153]
Test_Colors[126] = [255, 102, 153]
Test_Colors[127] = [0, 153, 153]
Test_Colors[128] = [51, 153, 153]
Test_Colors[129] = [102, 153, 153]
Test_Colors[130] = [153, 153, 153]
Test_Colors[131] = [204, 153, 153]
Test_Colors[132] = [255, 153, 153]
Test_Colors[133] = [0, 204, 153]
Test_Colors[134] = [51, 204, 153]
Test_Colors[135] = [102, 204, 153]
Test_Colors[136] = [153, 204, 153]
Test_Colors[137] = [204, 204, 153]
Test_Colors[138] = [255, 204, 153]
Test_Colors[139] = [0, 255, 153]
Test_Colors[140] = [51, 255, 153]
Test_Colors[141] = [102, 255, 135]
Test_Colors[142] = [153, 255, 153]
Test_Colors[143] = [204, 255, 153]
Test_Colors[144] = [255, 255, 153]
Test_Colors[145] = [0, 0, 204]
Test_Colors[146] = [51, 0, 204]
Test_Colors[147] = [102, 0, 204]
Test_Colors[148] = [153, 0, 204]
Test_Colors[149] = [204, 0, 204]
Test_Colors[150] = [255, 0, 204]
Test_Colors[151] = [0, 51, 204]
Test_Colors[152] = [51, 51, 204]
Test_Colors[153] = [102, 51, 204]
Test_Colors[154] = [153, 51, 204]
Test_Colors[155] = [204, 51, 204]
Test_Colors[156] = [255, 51, 204]
Test_Colors[157] = [0, 102, 204]
Test_Colors[158] = [51, 102, 204]
Test_Colors[159] = [102, 102, 204]
Test_Colors[160] = [153, 102, 204]
Test_Colors[161] = [204, 102, 204]
Test_Colors[162] = [255, 102, 204]
Test_Colors[163] = [0, 153, 204]
Test_Colors[164] = [51, 153, 204]
Test_Colors[165] = [102, 153, 204]
Test_Colors[166] = [153, 153, 204]
Test_Colors[167] = [204, 153, 204]
Test_Colors[168] = [255, 153, 204]
Test_Colors[169] = [0, 204, 204]
Test_Colors[170] = [51, 204, 204]
Test_Colors[171] = [102, 204, 204]
Test_Colors[172] = [153, 204, 204]
Test_Colors[173] = [204, 204, 204]
Test_Colors[174] = [255, 204, 204]
Test_Colors[175] = [0, 255, 204]
Test_Colors[176] = [51, 255, 204]
Test_Colors[177] = [102, 255, 204]
Test_Colors[178] = [153, 255, 204]
Test_Colors[179] = [204, 255, 204]
Test_Colors[180] = [255, 255, 204]
Test_Colors[181] = [0, 0, 255]
Test_Colors[182] = [51, 0, 255]
Test_Colors[183] = [102, 0, 255]
Test_Colors[184] = [153, 0, 255]
Test_Colors[185] = [204, 0, 255]
Test_Colors[186] = [255, 0, 255]
Test_Colors[187] = [0, 51, 255]
Test_Colors[188] = [51, 51, 255]
Test_Colors[189] = [102, 51, 255]
Test_Colors[190] = [153, 51, 255]
Test_Colors[191] = [204, 51, 255]
Test_Colors[192] = [255, 51, 255]
Test_Colors[193] = [0, 102, 255]
Test_Colors[194] = [51, 102, 255]
Test_Colors[195] = [102, 102, 255]
Test_Colors[196] = [153, 102, 255]
Test_Colors[197] = [204, 102, 255]
Test_Colors[198] = [255, 102, 255]
Test_Colors[199] = [0, 153, 255]
Test_Colors[200] = [51, 153, 255]
Test_Colors[201] = [102, 153, 255]
Test_Colors[202] = [153, 153, 255]
Test_Colors[203] = [204, 153, 255]
Test_Colors[204] = [255, 153, 255]
Test_Colors[205] = [0, 204, 255]
Test_Colors[206] = [51, 204, 25]
Test_Colors[207] = [102, 204, 255]
Test_Colors[208] = [153, 204, 255]
Test_Colors[209] = [204, 204, 255]
Test_Colors[210] = [255, 204, 255]
Test_Colors[211] = [0, 255, 255]
Test_Colors[212] = [51, 255, 255]
Test_Colors[213] = [102, 255, 255]
Test_Colors[214] = [153, 255, 255]
Test_Colors[215] = [204, 255, 255]
Test_Colors[216] = [255, 255, 255]
Test_Colors.default = [255, 255, 255, 255]
@cache = {}
def self.get_color(id)
unless @cache.has_key?(id)
@cache[id] = Color.new(*Text_Colors[id])
end
return @cache[id]
end
end
class Window_Base
#-----------------------------------------------------------------------------
#--------------------------------------------------------------------------
# * Get Text Color
#--------------------------------------------------------------------------
def text_color(n)
return Plague180_Color.get_color(n)
end
#--------------------------------------------------------------------------
# * Get Normal Text Color
#--------------------------------------------------------------------------
def normal_color
return Plague180_Color.get_color('normal')
end
#--------------------------------------------------------------------------
# * Get Disabled Text Color
#--------------------------------------------------------------------------
def disabled_color
return Plague180_Color.get_color('disabled')
end
#--------------------------------------------------------------------------
# * Get System Text Color
#--------------------------------------------------------------------------
def system_color
return Plague180_Color.get_color('system')
end
#--------------------------------------------------------------------------
# * Get Crisis Text Color
#--------------------------------------------------------------------------
def crisis_color
return Plague180_Color.get_color('crisis')
end
#--------------------------------------------------------------------------
# * Get Knockout Text Color
#--------------------------------------------------------------------------
def knockout_color
return Plague180_Color.get_color('knockout')
end
end
Normal_Color = [255, 255, 255, 255]
Disabled_Color = [255, 255, 255, 128]
System_Color = [192, 224, 255, 255]
Crisis_Color = [255, 255, 64, 255]
Knockout_Color = [255, 64, 0, 255]
#------------------------------------------------------------------------------
@@text_color_cache = {}
Test_Colors = {}
Test_Colors['normal'] = Normal_Color
Test_Colors['disabled'] = Disabled_Color
Test_Colors['system'] = System_Color
Test_Colors['crisis'] = Crisis_Color
Test_Colors['knockout'] = Knockout_Color
Test_Colors = {}
Test_Colors['normal'] = [255, 255, 255]
Test_Colors['disabled'] = [255, 255, 255, 128]
Test_Colors['system'] = [192, 224, 255]
Test_Colors['crisis'] = [255, 255, 64]
Test_Colors['knockout'] = [255, 64, 0]
#==============================================================================
# ** Window_Base
#This class was re-written by plague180 to include 216 colors.
#Special thanks to SephirothSpawn for exsplaining how to set up the cache.
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
module Plague180_Color
#To configure you can either change the numerical values or point it towards
#one of the Test_Colors e.g:
#Normanl_Color = Test_Colors[210]
Test_Colors = {}
Test_Colors['normal'] = [255, 255, 255, 255]
Test_Colors['disabled'] = [255, 255, 255, 128]
Test_Colors['system'] = [192, 224, 255, 255]
Test_Colors['crisis'] = [255, 255, 64, 255]
Test_Colors['knockout'] = [255, 64, 0, 255]
#------------------------------------------------------------------------------
Test_Colors[1] = [0, 0, 0]
Test_Colors[2] = [51, 0, 0]
Test_Colors[3] = [102, 0, 0]
Test_Colors[4] = [153, 0, 0]
Test_Colors[5] = [204, 0, 0]
Test_Colors[6] = [255, 0, 0]
Test_Colors[7] = [0, 51, 0]
Test_Colors[8] = [51, 51, 0]
Test_Colors[9] = [102, 51, 0]
Test_Colors[10] = [153, 51, 0]
Test_Colors[11] = [204, 51, 0]
Test_Colors[12] = [255, 51, 0]
Test_Colors[13] = [0, 102, 0]
Test_Colors[14] = [51, 102, 0]
Test_Colors[15] = [102, 102, 0]
Test_Colors[16] = [153, 102, 0]
Test_Colors[17] = [204, 102, 0]
Test_Colors[18] = [255, 102, 0]
Test_Colors[19] = [0, 153, 0]
Test_Colors[20] = [51, 153, 0]
Test_Colors[21] = [102, 153, 0]
Test_Colors[22] = [153, 153, 0]
Test_Colors[23] = [204, 153, 0]
Test_Colors[24] = [255, 153, 0]
Test_Colors[25] = [0, 204, 0]
Test_Colors[26] = [51, 204, 0]
Test_Colors[27] = [102, 204, 0]
Test_Colors[28] = [153, 204, 0]
Test_Colors[29] = [204, 204, 0]
Test_Colors[30] = [255, 204, 0]
Test_Colors[31] = [0, 255, 0]
Test_Colors[32] = [51, 255, 0]
Test_Colors[33] = [102, 255, 0]
Test_Colors[34] = [153, 255, 0]
Test_Colors[35] = [204, 255, 0]
Test_Colors[36] = [255, 255, 0]
Test_Colors[37] = [0, 0, 51]
Test_Colors[38] = [51, 0, 51]
Test_Colors[39] = [102, 0, 51]
Test_Colors[40] = [153, 0, 51]
Test_Colors[41] = [204, 0, 51]
Test_Colors[42] = [255, 0, 51]
Test_Colors[43] = [0, 51, 51]
Test_Colors[44] = [51, 51, 51]
Test_Colors[45] = [102, 51, 51]
Test_Colors[46] = [153, 51, 51]
Test_Colors[47] = [204, 51, 51]
Test_Colors[48] = [255, 51, 51]
Test_Colors[49] = [0, 102, 51]
Test_Colors[50] = [51, 102, 51]
Test_Colors[51] = [102, 102, 51]
Test_Colors[52] = [153, 102, 51]
Test_Colors[53] = [204, 102, 51]
Test_Colors[54] = [255, 102, 51]
Test_Colors[55] = [0, 153, 51]
Test_Colors[56] = [51, 153, 51]
Test_Colors[57] = [102, 153, 51]
Test_Colors[58] = [153, 153, 51]
Test_Colors[59] = [204, 153, 51]
Test_Colors[60] = [255, 153, 51]
Test_Colors[61] = [0, 204, 51]
Test_Colors[62] = [51, 204, 51]
Test_Colors[63] = [102, 204, 51]
Test_Colors[64] = [153, 204, 51]
Test_Colors[65] = [204, 204, 51]
Test_Colors[66] = [255, 204, 51]
Test_Colors[67] = [0, 255, 51]
Test_Colors[68] = [51, 255, 51]
Test_Colors[69] = [102, 255, 51]
Test_Colors[70] = [153, 255, 51]
Test_Colors[71] = [204, 255, 51]
Test_Colors[72] = [255, 255, 51]
Test_Colors[73] = [0, 0, 102]
Test_Colors[74] = [51, 0, 102]
Test_Colors[75] = [102, 0, 102]
Test_Colors[76] = [153, 0, 102]
Test_Colors[77] = [204, 0, 102]
Test_Colors[78] = [255, 0, 102]
Test_Colors[79] = [0, 51, 102]
Test_Colors[80] = [51, 51, 102]
Test_Colors[81] = [102, 51, 102]
Test_Colors[82] = [153, 51, 102]
Test_Colors[83] = [204, 51, 102]
Test_Colors[84] = [255, 51, 102]
Test_Colors[85] = [0, 102, 102]
Test_Colors[86] = [51, 102, 102]
Test_Colors[87] = [102, 102, 102]
Test_Colors[88] = [153, 102, 102]
Test_Colors[89] = [204, 102, 102]
Test_Colors[90] = [255, 102, 102]
Test_Colors[91] = [0, 153, 102]
Test_Colors[92] = [51, 153, 102]
Test_Colors[93] = [102, 153, 102]
Test_Colors[94] = [153, 153, 102]
Test_Colors[95] = [204, 153, 102]
Test_Colors[96] = [255, 153, 102]
Test_Colors[97] = [0, 204, 102]
Test_Colors[98] = [51, 204, 102]
Test_Colors[99] = [102, 204, 102]
Test_Colors[100] = [153, 204, 102]
Test_Colors[101] = [204, 204, 102]
Test_Colors[102] = [255, 204, 102]
Test_Colors[103] = [0, 255, 102]
Test_Colors[104] = [51, 255, 102]
Test_Colors[105] = [102, 255, 102]
Test_Colors[106] = [153, 255, 102]
Test_Colors[107] = [204, 255, 102]
Test_Colors[108] = [255, 255, 102]
Test_Colors[109] = [0, 0, 153]
Test_Colors[110] = [51, 0, 153]
Test_Colors[111] = [102, 0, 153]
Test_Colors[112] = [153, 0, 153]
Test_Colors[113] = [204, 0, 153]
Test_Colors[114] = [255, 0, 153]
Test_Colors[115] = [0, 51, 153]
Test_Colors[116] = [51, 51, 153]
Test_Colors[117] = [102, 51, 153]
Test_Colors[118] = [153, 51, 153]
Test_Colors[119] = [204, 51, 153]
Test_Colors[120] = [255, 51, 153]
Test_Colors[121] = [0, 102, 153]
Test_Colors[122] = [51, 102, 153]
Test_Colors[123] = [102, 102, 153]
Test_Colors[124] = [153, 102, 153]
Test_Colors[125] = [204, 102, 153]
Test_Colors[126] = [255, 102, 153]
Test_Colors[127] = [0, 153, 153]
Test_Colors[128] = [51, 153, 153]
Test_Colors[129] = [102, 153, 153]
Test_Colors[130] = [153, 153, 153]
Test_Colors[131] = [204, 153, 153]
Test_Colors[132] = [255, 153, 153]
Test_Colors[133] = [0, 204, 153]
Test_Colors[134] = [51, 204, 153]
Test_Colors[135] = [102, 204, 153]
Test_Colors[136] = [153, 204, 153]
Test_Colors[137] = [204, 204, 153]
Test_Colors[138] = [255, 204, 153]
Test_Colors[139] = [0, 255, 153]
Test_Colors[140] = [51, 255, 153]
Test_Colors[141] = [102, 255, 135]
Test_Colors[142] = [153, 255, 153]
Test_Colors[143] = [204, 255, 153]
Test_Colors[144] = [255, 255, 153]
Test_Colors[145] = [0, 0, 204]
Test_Colors[146] = [51, 0, 204]
Test_Colors[147] = [102, 0, 204]
Test_Colors[148] = [153, 0, 204]
Test_Colors[149] = [204, 0, 204]
Test_Colors[150] = [255, 0, 204]
Test_Colors[151] = [0, 51, 204]
Test_Colors[152] = [51, 51, 204]
Test_Colors[153] = [102, 51, 204]
Test_Colors[154] = [153, 51, 204]
Test_Colors[155] = [204, 51, 204]
Test_Colors[156] = [255, 51, 204]
Test_Colors[157] = [0, 102, 204]
Test_Colors[158] = [51, 102, 204]
Test_Colors[159] = [102, 102, 204]
Test_Colors[160] = [153, 102, 204]
Test_Colors[161] = [204, 102, 204]
Test_Colors[162] = [255, 102, 204]
Test_Colors[163] = [0, 153, 204]
Test_Colors[164] = [51, 153, 204]
Test_Colors[165] = [102, 153, 204]
Test_Colors[166] = [153, 153, 204]
Test_Colors[167] = [204, 153, 204]
Test_Colors[168] = [255, 153, 204]
Test_Colors[169] = [0, 204, 204]
Test_Colors[170] = [51, 204, 204]
Test_Colors[171] = [102, 204, 204]
Test_Colors[172] = [153, 204, 204]
Test_Colors[173] = [204, 204, 204]
Test_Colors[174] = [255, 204, 204]
Test_Colors[175] = [0, 255, 204]
Test_Colors[176] = [51, 255, 204]
Test_Colors[177] = [102, 255, 204]
Test_Colors[178] = [153, 255, 204]
Test_Colors[179] = [204, 255, 204]
Test_Colors[180] = [255, 255, 204]
Test_Colors[181] = [0, 0, 255]
Test_Colors[182] = [51, 0, 255]
Test_Colors[183] = [102, 0, 255]
Test_Colors[184] = [153, 0, 255]
Test_Colors[185] = [204, 0, 255]
Test_Colors[186] = [255, 0, 255]
Test_Colors[187] = [0, 51, 255]
Test_Colors[188] = [51, 51, 255]
Test_Colors[189] = [102, 51, 255]
Test_Colors[190] = [153, 51, 255]
Test_Colors[191] = [204, 51, 255]
Test_Colors[192] = [255, 51, 255]
Test_Colors[193] = [0, 102, 255]
Test_Colors[194] = [51, 102, 255]
Test_Colors[195] = [102, 102, 255]
Test_Colors[196] = [153, 102, 255]
Test_Colors[197] = [204, 102, 255]
Test_Colors[198] = [255, 102, 255]
Test_Colors[199] = [0, 153, 255]
Test_Colors[200] = [51, 153, 255]
Test_Colors[201] = [102, 153, 255]
Test_Colors[202] = [153, 153, 255]
Test_Colors[203] = [204, 153, 255]
Test_Colors[204] = [255, 153, 255]
Test_Colors[205] = [0, 204, 255]
Test_Colors[206] = [51, 204, 25]
Test_Colors[207] = [102, 204, 255]
Test_Colors[208] = [153, 204, 255]
Test_Colors[209] = [204, 204, 255]
Test_Colors[210] = [255, 204, 255]
Test_Colors[211] = [0, 255, 255]
Test_Colors[212] = [51, 255, 255]
Test_Colors[213] = [102, 255, 255]
Test_Colors[214] = [153, 255, 255]
Test_Colors[215] = [204, 255, 255]
Test_Colors[216] = [255, 255, 255]
Test_Colors.default = [255, 255, 255, 255]
@cache = {}
def self.get_color(id)
unless @cache.has_key?(id)
@cache[id] = Color.new(*Test_Colors[id])
end
return @cache[id]
end
end
class Window_Base
#-----------------------------------------------------------------------------
#--------------------------------------------------------------------------
# * Get Text Color
#--------------------------------------------------------------------------
def text_color(n)
return Plague180_Color.get_color(n)
end
#--------------------------------------------------------------------------
# * Get Normal Text Color
#--------------------------------------------------------------------------
def normal_color
return Plague180_Color.get_color('normal')
end
#--------------------------------------------------------------------------
# * Get Disabled Text Color
#--------------------------------------------------------------------------
def disabled_color
return Plague180_Color.get_color('disabled')
end
#--------------------------------------------------------------------------
# * Get System Text Color
#--------------------------------------------------------------------------
def system_color
return Plague180_Color.get_color('system')
end
#--------------------------------------------------------------------------
# * Get Crisis Text Color
#--------------------------------------------------------------------------
def crisis_color
return Plague180_Color.get_color('crisis')
end
#--------------------------------------------------------------------------
# * Get Knockout Text Color
#--------------------------------------------------------------------------
def knockout_color
return Plague180_Color.get_color('knockout')
end
end