Skip to content

Commit

Permalink
[Fix] Bug in finding the ROOT colors
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbattistini committed Aug 2, 2024
1 parent 46c7bf5 commit a4995ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions fempy/utils/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ def GetColor(color:str):
if name in color:
break

for shade in range(-10, 11):
abshade = abs(shade)
if f'+{abshade}' in color or f' + {abshade}' in color or f' +{abshade}' in color or f'+ {abshade}' in color or \
f'-{abshade}' in color or f' - {abshade}' in color or f' -{abshade}' in color or f'- {abshade}' in color:
for shade in range(0, 11):
if f'+{shade}' in color or f' + {shade}' in color or f' +{shade}' in color or f'+ {shade}' in color:
return value + shade

if f'-{shade}' in color or f' - {shade}' in color or f' -{shade}' in color or f'- {shade}' in color:
return value - shade

fempy.logger.warn('Color %s could not be loaded. Using kBlack instead', color)
return EColor.kBlack

Expand Down

0 comments on commit a4995ad

Please sign in to comment.