2222 "BLUE_E" ,
2323 "BLUE_D" ,
2424 "BLUE_C" ,
25+ "BLUE" ,
2526 "BLUE_B" ,
2627 "BLUE_A" ,
2728 "TEAL_E" ,
2829 "TEAL_D" ,
2930 "TEAL_C" ,
31+ "TEAL" ,
3032 "TEAL_B" ,
3133 "TEAL_A" ,
3234 "GREEN_E" ,
3335 "GREEN_D" ,
3436 "GREEN_C" ,
37+ "GREEN" ,
3538 "GREEN_B" ,
3639 "GREEN_A" ,
3740 "YELLOW_E" ,
3841 "YELLOW_D" ,
3942 "YELLOW_C" ,
43+ "YELLOW" ,
4044 "YELLOW_B" ,
4145 "YELLOW_A" ,
4246 "GOLD_E" ,
4347 "GOLD_D" ,
4448 "GOLD_C" ,
49+ "GOLD" ,
4550 "GOLD_B" ,
4651 "GOLD_A" ,
4752 "RED_E" ,
4853 "RED_D" ,
4954 "RED_C" ,
55+ "RED" ,
5056 "RED_B" ,
5157 "RED_A" ,
5258 "MAROON_E" ,
5359 "MAROON_D" ,
5460 "MAROON_C" ,
61+ "MAROON" ,
5562 "MAROON_B" ,
5663 "MAROON_A" ,
5764 "PURPLE_E" ,
5865 "PURPLE_D" ,
5966 "PURPLE_C" ,
67+ "PURPLE" ,
6068 "PURPLE_B" ,
6169 "PURPLE_A" ,
6270 "WHITE" ,
8290from colour import Color
8391import numpy as np
8492
85- from ..constants import COLOR_MAP
8693from ..utils .bezier import interpolate
8794from ..utils .simple_functions import clip_in_place
8895from ..utils .space_ops import normalize
@@ -179,41 +186,49 @@ class Colors(Enum):
179186BLUE_E = Colors .blue_e .value
180187BLUE_D = Colors .blue_d .value
181188BLUE_C = Colors .blue_c .value
189+ BLUE = Colors .blue .value
182190BLUE_B = Colors .blue_b .value
183191BLUE_A = Colors .blue_a .value
184192TEAL_E = Colors .teal_e .value
185193TEAL_D = Colors .teal_d .value
186194TEAL_C = Colors .teal_c .value
195+ TEAL = Colors .teal .value
187196TEAL_B = Colors .teal_b .value
188197TEAL_A = Colors .teal_a .value
189198GREEN_E = Colors .green_e .value
190199GREEN_D = Colors .green_d .value
191200GREEN_C = Colors .green_c .value
201+ GREEN = Colors .green .value
192202GREEN_B = Colors .green_b .value
193203GREEN_A = Colors .green_a .value
194204YELLOW_E = Colors .yellow_e .value
195205YELLOW_D = Colors .yellow_d .value
196206YELLOW_C = Colors .yellow_c .value
207+ YELLOW = Colors .yellow .value
197208YELLOW_B = Colors .yellow_b .value
198209YELLOW_A = Colors .yellow_a .value
199210GOLD_E = Colors .gold_e .value
200211GOLD_D = Colors .gold_d .value
201212GOLD_C = Colors .gold_c .value
213+ GOLD = Colors .gold .value
202214GOLD_B = Colors .gold_b .value
203215GOLD_A = Colors .gold_a .value
204216RED_E = Colors .red_e .value
205217RED_D = Colors .red_d .value
206218RED_C = Colors .red_c .value
219+ RED = Colors .red .value
207220RED_B = Colors .red_b .value
208221RED_A = Colors .red_a .value
209222MAROON_E = Colors .maroon_e .value
210223MAROON_D = Colors .maroon_d .value
211224MAROON_C = Colors .maroon_c .value
225+ MAROON = Colors .maroon .value
212226MAROON_B = Colors .maroon_b .value
213227MAROON_A = Colors .maroon_a .value
214228PURPLE_E = Colors .purple_e .value
215229PURPLE_D = Colors .purple_d .value
216230PURPLE_C = Colors .purple_c .value
231+ PURPLE = Colors .purple .value
217232PURPLE_B = Colors .purple_b .value
218233PURPLE_A = Colors .purple_a .value
219234WHITE = Colors .white .value
@@ -265,7 +280,7 @@ def hex_to_rgb(hex_code):
265280 hex_part = hex_code [1 :]
266281 if len (hex_part ) == 3 :
267282 "" .join ([2 * c for c in hex_part ])
268- return np .array ([int (hex_part [i : i + 2 ], 16 ) / 255 for i in range (0 , 6 , 2 )])
283+ return np .array ([int (hex_part [i : i + 2 ], 16 ) / 255 for i in range (0 , 6 , 2 )])
269284
270285
271286def invert_color (color ):
@@ -326,4 +341,4 @@ def get_shaded_rgb(rgb, point, unit_normal_vect, light_source):
326341 factor *= 0.5
327342 result = rgb + factor
328343 clip_in_place (rgb + factor , 0 , 1 )
329- return result
344+ return result
0 commit comments