Download Kqlmagic from PyPI and install/update (if latest version ims already installed you can skip this step)
#!pip install Kqlmagic --no-cache-dir --upgrade
%reload_ext Kqlmagic
%kql AzureDataExplorer://code;cluster='help';database='Samples'
%%kql
StormEvents
| summarize count() by State
| sort by count_
| limit 10
| render piechart
%%kql -palette_name "Reds"
StormEvents
| summarize count() by State
| sort by count_
| limit 10
| render piechart
%%kql -palette_name "Reds" -palette_desaturation 0.5
StormEvents
| summarize count() by State
| sort by count_
| limit 10
| render piechart
my_palettes = ["Reds", "Greens", "Blues"]
my_saturation = 0.7
current_palette = 2
%%kql -palette_name my_palettes[current_palette] -palette_desaturation my_saturation
StormEvents
| summarize count() by State
| sort by count_
| limit 10
| render piechart
current_palette = 0
%%kql -palette_name my_palettes[current_palette] -palette_desaturation my_saturation
StormEvents
| summarize count() by State
| sort by count_
| limit 10
| render piechart
%kql --palette
%kql --palette -pd 0.5
%kql --palette -pd 0.5 -pc 40
%kql --palette -pn "Reds" -pd 0.5 -pc 40
%kql --palettes -popup_window
%kql --palettes -palette_desaturation 0.5
%kql --palettes -pd 0.5 -pc 20 -pw
%config Kqlmagic.palette_name
%config Kqlmagic.palette_name = 'Greens'
%config Kqlmagic.palette_name
%config Kqlmagic.palette_desaturation
%config Kqlmagic.palette_desaturation = 0.95
%config Kqlmagic.palette_desaturation
%config Kqlmagic.palette_colors
%config Kqlmagic.palette_colors = 6
%config Kqlmagic.palette_colors
%kql --palette
%%kql -palette_desaturation 0.5
StormEvents
| summarize count() by State
| sort by count_
| limit 10
| render piechart
%%kql -palette_reverse
StormEvents
| summarize count() by State
| sort by count_
| limit 10
| render piechart
%config Kqlmagic.palette_colors = 20
%config Kqlmagic.palette_colors
%kql --palette -pn "pastel"
%kql --palette -pn "pastel[4:11]"
%kql --palette -pn "pastel_r"
%kql --palette -pn "pastel[4:11]_r"
%%kql -pn "pastel[4:11]_r"
StormEvents
| summarize count() by State
| sort by count_
| limit 7
| render piechart
%config Kqlmagic.palette_name = "pastel[4:11]_r"
%config Kqlmagic.palette_name
%%kql
StormEvents
| summarize count() by State
| extend count2 = count_*1.4
| extend count3 = count_*2.4
| sort by count_
| limit 7
| render barchart
%kql --palette -pn "['rgb(127,155,173)','rgb(103,135,156)','rgb(82,114,140)','rgb(63,93,122)','rgb(48,73,102)']"
%kql --palette -pn "['rgb(127,155,173)','rgb(103,135,156)','rgb(82,114,140)','rgb(63,93,122)','rgb(48,73,102)'][1:4]"
%kql --palette -pn "['rgb(127,155,173)','rgb(103,135,156)','rgb(82,114,140)','rgb(63,93,122)','rgb(48,73,102)'][1:4]_r"
%%kql -pn "['rgb(127,155,173)','rgb(103,135,156)','rgb(82,114,140)','rgb(63,93,122)','rgb(48,73,102)'][1:4]_r"
StormEvents
| summarize count() by State
| extend count2 = count_*1.4
| extend count3 = count_*2.4
| sort by count_
| limit 7
| render columnchart
%config Kqlmagic.palette_name = "['rgb(127,155,173)','rgb(103,135,156)','rgb(82,114,140)','rgb(63,93,122)','rgb(48,73,102)'][1:4]_r"
%config Kqlmagic.palette_name
%%kql
StormEvents
| summarize count() by State
| extend count2 = count_*1.4
| extend count3 = count_*2.4
| sort by count_
| limit 7
| render barchart
%%kql -pn "Spectral" -pd 0.95 -pc 10
StormEvents
| summarize count() by State
| extend count2 = count_*1.4
| extend count3 = count_*2.4
| sort by count_
| limit 10
| render piechart
_kql_raw_result_.palette
_kql_raw_result_.palette[3:]
_kql_raw_result_.palette[7]
list(_kql_raw_result_.palette)
_kql_raw_result_.options['palette_name']
_kql_raw_result_.options['palette_colors']
_kql_raw_result_.options['palette_desaturation']
_kql_raw_result_.options['palette_reverse']
_kql_raw_result_.palettes
_kql_raw_result_.palettes['Oranges']
_kql_raw_result_.palettes[5]
_kql_raw_result_.palettes[5][:6]
_kql_raw_result_.palettes[5][:6][3]
_kql_raw_result_.palettes['terrain'][:6]
list(_kql_raw_result_.palettes)
list(_kql_raw_result_.palettes[5][:6])
%kql --help