wordpress/wp-content/plugins/kt-tinymce-color-grid/index.php
/**
         * Render TinyMCE rainbow color map
         * @since 1.7
         * @return array
         */
Render TinyMCE rainbow color map
@since 1.7
@return array
Render TinyMCE rainbow color map @since 1 . 7 @return array
protected function render_rainbow() {
            list($palette, $rows, $columns) = $this->chunk_palette();
            $rgb = array();
            for ($i = 0; $i < $columns; $i++) {
                $rgb[] = $this->hue2rgb($i / $columns);
            }
            $map = array();
            $type = $this->get_option(self::LUMA, self::DEFAULT_LUMA);
            for ($row = 0; $row < $rows; $row++) {
                $this->add_row_to_map($map, $palette, $row);
                $luma = 2 * ($row + 1) / ($rows + 1) - 1;
                $luma = $this->transform_luma($luma, $type);
                for ($col = 0; $col < $columns; $col++) {
                    $_rgb = $this->apply_luma($luma, $rgb[$col]);
                    $map[] = $this->rgb2hex($_rgb, true, false);
                    $map[] = "";
                }
                $this->add_monocroma($map, $row, $rows);
            }
            $columns += count($palette) + 1;
            return compact('map', 'rows', 'columns');
        }
protected function render_rainbow ( ) { list ( $ palette , $ rows , $ columns ) = $ this -> chunk_palette ( ) ; $ rgb = array ( ) ; for ( $ i = 0 ; $ i < $ columns ; $ i ++ ) { $ rgb [ ] = $ this -> hue2rgb ( $ i / $ columns ) ; } $ map = array ( ) ; $ type = $ this -> get_option ( self :: LUMA , self :: DEFAULT_LUMA ) ; for ( $ row = 0 ; $ row < $ rows ; $ row ++ ) { $ this -> add_row_to_map ( $ map , $ palette , $ row ) ; $ luma = 2 * ( $ row + 1 ) / ( $ rows + 1 ) - 1 ; $ luma = $ this -> transform_luma ( $ luma , $ type ) ; for ( $ col = 0 ; $ col < $ columns ; $ col ++ ) { $ _rgb = $ this -> apply_luma ( $ luma , $ rgb [ $ col ] ) ; $ map [ ] = $ this -> rgb2hex ( $ _rgb , true , false ) ; $ map [ ] = " " ; } $ this -> add_monocroma ( $ map , $ row , $ rows ) ; } $ columns += count ( $ palette ) + 1 ; return compact ( 'map' , 'rows' , 'columns' ) ; }
Render TinyMCE rainbow color map
 @since 1.7
 @return array
Render TinyMCE rainbow color map @since 1 . 7 @return array