diff options
| author | Rusty Wagner <rusty@vector35.com> | 2018-09-05 14:39:46 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2018-09-05 14:39:46 -0400 |
| commit | f4d75c9229d2d76f36f80e97dd49c7aece242600 (patch) | |
| tree | 0390fc2b624149274c5c01b847d59698055a2974 /python/highlight.py | |
| parent | c02c863367ff88c1e562a1110e069bf2842798aa (diff) | |
| parent | e51031010b107089dd7b5b69039ac42b856a0769 (diff) | |
Merge branch 'test_stack_adjust' into dev
Diffstat (limited to 'python/highlight.py')
| -rw-r--r-- | python/highlight.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/highlight.py b/python/highlight.py index 55246a9a..502caa80 100644 --- a/python/highlight.py +++ b/python/highlight.py @@ -110,3 +110,13 @@ class HighlightColor(object): result.b = self.blue return result + + @staticmethod + def _from_core_struct(color): + if color.style == HighlightColorStyle.StandardHighlightColor: + return HighlightColor(color=color.color, alpha=color.alpha) + elif color.style == HighlightColorStyle.MixedHighlightColor: + return HighlightColor(color=color.color, mix_color=color.mixColor, mix=color.mix, alpha=color.alpha) + elif color.style == HighlightColorStyle.CustomHighlightColor: + return HighlightColor(red=color.r, green=color.g, blue=color.b, alpha=color.alpha) + return HighlightColor(color=HighlightStandardColor.NoHighlightColor) |
