Skip to content

Commit cf1be6b

Browse files
committed
Hardcoded colors hex values in utils.colors instead of relying on values from openpyxl since they were removed in openpyxl 3.0.4
1 parent 6b91494 commit cf1be6b

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

styleframe/utils.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import re
2-
from openpyxl.styles import colors as op_colors
32

43
HEX_REGEX = re.compile(r'^([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6})$')
54

@@ -40,16 +39,16 @@ def decimal_with_num_of_digits(num_of_digits):
4039

4140

4241
class colors(BaseDefClass):
43-
white = op_colors.WHITE
44-
blue = op_colors.BLUE
45-
dark_blue = op_colors.DARKBLUE
46-
yellow = op_colors.YELLOW
47-
dark_yellow = op_colors.DARKYELLOW
48-
green = op_colors.GREEN
49-
dark_green = op_colors.DARKGREEN
50-
black = op_colors.BLACK
51-
red = op_colors.RED
52-
dark_red = op_colors.DARKRED
42+
white = '00FFFFFF'
43+
blue = '000000FF'
44+
dark_blue = '00000080'
45+
yellow = '00FFFF00'
46+
dark_yellow = '00808000'
47+
green = '0000FF00'
48+
dark_green = '00008000'
49+
black = '00000000'
50+
red = '00FF0000'
51+
dark_red = '00800000'
5352
purple = '800080'
5453
grey = 'D3D3D3'
5554

0 commit comments

Comments
 (0)