def to_html(self,
                protocol='http',
                d3_url=None,
                d3_scale_chromatic_url=None,
                html_base=None,
                search_input_id='searchInput',
                halo_colors: Optional[dict] = None):
        '''
        Parameters
        ----------
        protocol : str
         'http' or 'https' for including external urls
        d3_url, str
          None by default.  The url (or path) of
          d3, to be inserted into <script src="..."/>
          By default, this is `DEFAULT_D3_URL` declared in `ScatterplotStructure`.
        d3_scale_chromatic_url : str
          None by default.
          URL of d3_scale_chromatic_url, to be inserted into <script src="..."/>
          By default, this is `DEFAULT_D3_SCALE_CHROMATIC` declared in `ScatterplotStructure`.
        html_base : str
            None by default.  HTML of semiotic square to be inserted above plot.
        search_input_id : str
            Id of search input. Default is 'searchInput'.
        halo_colors : Optional[Dict[str, str]]
            If None, defaults to HALO_COLORS. Maps halo position to background color
        Returns
        -------
        str, the html file representation

        '''
        halo_colors = HALO_COLORS if halo_colors is None else halo_colors
        d3_url_struct = D3URLs(d3_url, d3_scale_chromatic_url)
        ExternalJSUtilts.ensure_valid_protocol(protocol)
        javascript_to_insert = '\n'.join([
            PackedDataUtils.full_content_of_javascript_files(),
            self.scatterplot_structure._visualization_data.to_javascript(),
            self.scatterplot_structure.get_js_to_call_build_scatterplot(),
            PackedDataUtils.javascript_post_build_viz(search_input_id, 'plotInterface'),
        ])
        html_template = (PackedDataUtils.full_content_of_default_html_template()
                         if html_base is None
                         else self._format_html_base(html_base, halo_colors))
        html_content = (
                HELLO +
                html_template
                .replace('<!-- INSERT SCRIPT -->', javascript_to_insert, 1)
                .replace('<!-- INSERT SEARCH FORM -->',
                         PackedDataUtils.full_content_of_default_search_form(search_input_id), 1)
                .replace('<!--D3URL-->', d3_url_struct.get_d3_url(), 1)
                #.replace('<!--D3FCURL-->', d3_url_struct.get_d3fc_url(), 1)
                .replace('<!--D3SCALECHROMATIC-->', d3_url_struct.get_d3_scale_chromatic_url())
            # .replace('<!-- INSERT D3 -->', self._get_packaged_file_content('d3.min.js'), 1)
        )

        '''
        if html_base is not None:
            html_file = html_file.replace('<!-- INSERT SEMIOTIC SQUARE -->',
                                          html_base)
        '''

        extra_libs = ''
        if self.scatterplot_structure._save_svg_button:
            # extra_libs = '<script src="https://cdn.rawgit.com/edeno/d3-save-svg/gh-pages/assets/d3-save-svg.min.js" charset="utf-8"></script>'
            extra_libs = ''

        autocomplete_css = PackedDataUtils.full_content_of_default_autocomplete_css()
        html_content = (html_content
                        .replace('/***AUTOCOMPLETE CSS***/', autocomplete_css, 1)
                        .replace('<!-- EXTRA LIBS -->', extra_libs, 1)
                        .replace('http://', protocol + '://'))

        return html_content

        Parameters
        ----------
        protocol : str
         'http' or 'https' for including external urls
        d3_url, str
          None by default.  The url (or path) of
          d3, to be inserted into <script src="..."/>
          By default, this is `DEFAULT_D3_URL` declared in `ScatterplotStructure`.
        d3_scale_chromatic_url : str
          None by default.
          URL of d3_scale_chromatic_url, to be inserted into <script src="..."/>
          By default, this is `DEFAULT_D3_SCALE_CHROMATIC` declared in `ScatterplotStructure`.
        html_base : str
            None by default.  HTML of semiotic square to be inserted above plot.
        search_input_id : str
            Id of search input. Default is 'searchInput'.
        halo_colors : Optional[Dict[str, str]]
            If None, defaults to HALO_COLORS. Maps halo position to background color
        Returns
        -------
        str, the html file representation

        
scattertext/viz/BasicHTMLFromScatterplotStructure.py