public static function get_palette($numColors = 50, $type='hsv')
    {

        //overwriting with the palette from the calendar settings
        $s = CalendarConfig::subpackage_settings('colors');
        $arr = $s['basepalette'];
        return $arr;


        if ($type == 'hsv') {
            $s = 1;
            $v = 1;

            $arr = array();
            for ($i = 0; $i <= $numColors; $i++) {
                $c = new Color();
                $h = $i / $numColors;

                $hex = $c->fromHSV($h, $s, $v)->toHexString();
                $arr[$hex] = $hex;
            }

            return $arr;
        } elseif ($type == 'websafe') {

            //websafe colors
            $cs = array('00', '33', '66', '99', 'CC', 'FF');

            $arr = array();

            for ($i = 0; $i < 6; $i++) {
                for ($j = 0; $j < 6; $j++) {
                    for ($k = 0; $k < 6; $k++) {
                        $c = $cs[$i] . $cs[$j] . $cs[$k];
                        $arr["$c"] = "#$c";
                    }
                }
            }

            return $arr;
        }
    }