diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-09-12 17:03:38 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-09-12 17:03:38 -0400 |
| commit | 74a8547853dd66fe62d2e75b93c1b723eb6f69cf (patch) | |
| tree | 067119496c2beaf0636c955d27291d4620e17c0b /python/highlight.py | |
| parent | 097a2e4c8849d4938d8a027985ce3816fd9785ed (diff) | |
| parent | 59a2824b1ad36ea5d0520919e86ad779cd97cc8f (diff) | |
Merging with 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) |
