Colour Theory
* Apply colour theory to colour randomisation.
This commit is contained in:
parent
0051845804
commit
9b02b229c9
@ -306,6 +306,19 @@ label wardrobe_menu():
|
||||
|
||||
progress = get_character_progression(active_girl)
|
||||
|
||||
if wardrobe_randomise_color:
|
||||
|
||||
tetriadic_colors = [Color("%06x" % random.randint(0, 0xFFFFFF))]
|
||||
triadic_colors = [tetriadic_colors[0].rotate_hue(0.25)]
|
||||
double_colors = [tetriadic_colors[0], tetriadic_colors[0].rotate_hue(0.5)]
|
||||
|
||||
for i in range(1, 3):
|
||||
col = tetriadic_colors[0].rotate_hue((i * 90.0) / 360.0)
|
||||
tetriadic_colors.append(col)
|
||||
|
||||
col = triadic_colors[i-1].rotate_hue((i * 75.0) / 360.0)
|
||||
triadic_colors.append(col)
|
||||
|
||||
for k in dict(char_active.states).keys():
|
||||
valid_choices = [x for x in char_active.wardrobe_list if (istype(x, (DollCloth, DollClothDynamic, DollMakeup)) and x.type == k and x.unlocked and progress >= x.level)]
|
||||
|
||||
@ -343,10 +356,21 @@ label wardrobe_menu():
|
||||
if not cloth is None:
|
||||
|
||||
if wardrobe_randomise_color and cloth.color:
|
||||
col_len = len(cloth.color)
|
||||
col = []
|
||||
|
||||
for i in range(len(cloth.color)):
|
||||
col.append([random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), 255])
|
||||
for i in range(col_len):
|
||||
if col_len == 1:
|
||||
col.append(tetriadic_colors[0])
|
||||
elif col_len == 2:
|
||||
col.append(double_colors[i-1])
|
||||
elif col_len == 3:
|
||||
col.append(triadic_colors[i-1])
|
||||
else:
|
||||
try:
|
||||
col.append(tetriadic_colors[i-1])
|
||||
except:
|
||||
col.append(col[-1].rotate_hue(0.33))
|
||||
|
||||
cloth.set_color(col)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user