def get_cursor_color(self):
        """Get cursor color."""

        color = None
        alpha = None
        alpha_dec = None
        sels = self.view.sel()
        if (len(sels) == 1 and sels[0].size() == 0):
            point = sels[0].begin()
            visible = self.view.visible_region()
            start = point - 50
            end = point + 50
            if start < visible.begin():
                start = visible.begin()
            if end > visible.end():
                end = visible.end()
            bfr = self.view.substr(sublime.Region(start, end))
            ref = point - start
            rules = util.get_rules(self.view)
            use_hex_argb = rules.get("use_hex_argb", False) if rules else False
            allowed_colors = rules.get('allowed_colors', []) if rules else util.ALL
            for m in util.COLOR_RE.finditer(bfr):
                if ref >= m.start(0) and ref < m.end(0):
                    if m.group('hex_compressed') and 'hex_compressed' not in allowed_colors:
                        continue
                    elif m.group('hexa_compressed') and 'hexa_compressed' not in allowed_colors:
                        continue
                    elif m.group('hex') and 'hex' not in allowed_colors:
                        continue
                    elif m.group('hexa') and 'hexa' not in allowed_colors:
                        continue
                    elif m.group('rgb') and 'rgb' not in allowed_colors:
                        continue
                    elif m.group('rgba') and 'rgba' not in allowed_colors:
                        continue
                    elif m.group('gray') and 'gray' not in allowed_colors:
                        continue
                    elif m.group('graya') and 'graya' not in allowed_colors:
                        continue
                    elif m.group('hsl') and 'hsl' not in allowed_colors:
                        continue
                    elif m.group('hsla') and 'hsla' not in allowed_colors:
                        continue
                    elif m.group('hwb') and 'hwb' not in allowed_colors:
                        continue
                    elif m.group('hwba') and 'hwba' not in allowed_colors:
                        continue
                    color, alpha, alpha_dec = util.translate_color(m, bool(use_hex_argb))
                    break
        return color, alpha, alpha_dec
dataset/ETHPy150Open facelessuser/ColorHelper/color_helper.py/ColorHelperCommand.get_cursor_color/original