1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
Feature: Get and set font color
In order to work with the color of text
As a developer using python-docx
I need a way to get and set the text color
Scenario Outline: Get font color type
Given a font having <type> color
Then font.color.type is <value>
Examples: Color type settings
| type | value |
| no | None |
| auto | AUTO |
| an RGB | RGB |
| a theme | THEME |
Scenario Outline: Get font RGB color
Given a font having <type> color
Then font.color.rgb is <value>
Examples: Color type settings
| type | value |
| no | None |
| auto | None |
| an RGB | 008000 |
| a theme | 4f81bd |
Scenario Outline: Set font RGB color
Given a font having <type> color
When I assign <value> to font.color.rgb
Then font.color.type is <type-value>
Then font.color.rgb is <rgb-value>
Examples: Color type settings
| type | value | type-value | rgb-value |
| no | f00ba5 | RGB | f00ba5 |
| auto | 2468ac | RGB | 2468ac |
| an RGB | feeb1e | RGB | feeb1e |
| a theme | 987bac | RGB | 987bac |
| an RGB | None | None | None |
| a theme | None | None | None |
Scenario Outline: Get font theme color
Given a font having <type> color
Then font.color.theme_color is <value>
Examples: Color type settings
| type | value |
| no | None |
| auto | None |
| an RGB | None |
| a theme | ACCENT_1 |
Scenario Outline: Set font theme color
Given a font having <type> color
When I assign <value> to font.color.theme_color
Then font.color.type is <type-value>
Then font.color.theme_color is <theme-value>
Examples: Color type settings
| type | value | type-value | theme-value |
| no | ACCENT_2 | THEME | ACCENT_2 |
| auto | DARK_1 | THEME | DARK_1 |
| an RGB | TEXT_1 | THEME | TEXT_1 |
| a theme | LIGHT_2 | THEME | LIGHT_2 |
| a theme | None | None | None |
| an RGB | None | None | None |
|