<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:ThemeLibrary.Markup;assembly=ThemeLibrary"
    xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    xmlns:system="clr-namespace:System;assembly=mscorlib">

    <!--      Foreground = Text     -->
    <Color x:Key="Base.Foreground.Color" po:Freeze="True">#000000</Color>

    <!--      Background - not actual background but also base for mixing grays and other colors     -->
    <Color x:Key="Base.Background.Color">#FFFFFF</Color>
    

    
    <Color x:Key="Background.Color">#FFFFFF</Color>
    <SolidColorBrush
        x:Key="BackgroundBrush"
        po:Freeze="True"
        Color="{StaticResource Background.Color}" />
    <!--<SolidColorBrush x:Key="AccentBrush" Color="#ff00ff" po:Freeze="True"/>-->

    <!--      COMMON     -->
    <!-- You likely shouldn't change it
    these can be later used as resources
    Example: Gray30Color is 30% of the way between BlendColor and BackgroundBaseColor (ResourceKey here)
    -->
    <m:StaticResourceColorEx
x:Key="Gray03.Color"
BlendColor="#000000"
Multiplier=".03"
ResourceKey="Base.Background.Color" />
    <m:StaticResourceColorEx
    x:Key="Gray05.Color"
    BlendColor="#000000"
    Multiplier=".05"
    ResourceKey="Base.Background.Color" />
    <m:StaticResourceColorEx
        x:Key="Gray10.Color"
        BlendColor="#000000"
        Multiplier=".1"
        ResourceKey="Base.Background.Color" />
    <m:StaticResourceColorEx
        x:Key="Gray20.Color"
        po:Freeze="True"
        BlendColor="#000000"
        Multiplier=".2"
        ResourceKey="Base.Background.Color" />
    <m:StaticResourceColorEx
        x:Key="Gray30.Color"
        BlendColor="#000000"
        Multiplier=".3"
        ResourceKey="Base.Background.Color" />
    <m:StaticResourceColorEx
        x:Key="Gray40.Color"
        BlendColor="#000000"
        Multiplier=".4"
        ResourceKey="Base.Background.Color" />
    <m:StaticResourceColorEx
        x:Key="Gray50.Color"
        BlendColor="#000000"
        Multiplier=".5"
        ResourceKey="Base.Background.Color" />
    <m:StaticResourceColorEx
        x:Key="Gray60.Color"
        BlendColor="#000000"
        Multiplier=".6"
        ResourceKey="Base.Background.Color" />

    <m:StaticResourceColorEx
        x:Key="AccentF1.Color"
        BlendColor="#000000"
        Multiplier=".1"
        ResourceKey="Accent.Color" />
    <m:StaticResourceColorEx
        x:Key="AccentF2.Color"
        BlendColor="#000000"
        Multiplier=".2"
        ResourceKey="Accent.Color" />
    <m:StaticResourceColorEx
        x:Key="AccentF3.Color"
        BlendColor="#000000"
        Multiplier=".3"
        ResourceKey="Accent.Color" />

    <m:StaticResourceColorEx
        x:Key="AccentB1.Color"
        BlendColor="#FFFFFF"
        Multiplier="-.16"
        ResourceKey="Accent.Color" />
    <m:StaticResourceColorEx
        x:Key="AccentB2.Color"
        BlendColor="#FFFFFF"
        Multiplier="-.33"
        ResourceKey="Accent.Color" />

    <!--Used later for list item selection background, 
        so accent has to be diluted enough for text and also secondary text (extension, metadata) 
        to be visible on this color-->
    <m:StaticResourceColorEx
        x:Key="AccentB3.Color"
        BlendColor="#FFFFFF"
        Multiplier="-.50"
        ResourceKey="Accent.Color" />

    <!--Based on AccentX#Color, that are 10%, 20%, 30% toward Foreground color ("F") or background color ("B")  
        these values have to be higher for light theme than for dark-->
    <SolidColorBrush x:Key="AccentF1" Color="{StaticResource AccentF1.Color}" />
    <SolidColorBrush x:Key="AccentF2" Color="{StaticResource AccentF2.Color}" />
    <SolidColorBrush x:Key="AccentF3" Color="{StaticResource AccentF3.Color}" />
    <SolidColorBrush x:Key="AccentB1" Color="{StaticResource AccentB1.Color}" />
    <SolidColorBrush x:Key="AccentB2" Color="{StaticResource AccentB2.Color}" />
    <SolidColorBrush x:Key="AccentB3" Color="{StaticResource AccentB3.Color}" />

    <!--      COMMON end     -->



    <SolidColorBrush x:Key="Text.Primary" Color="{StaticResource Base.Foreground.Color}" />

    <!--  Highlighted Text, like GB portion of file size, or number of selected files. Can be the same as Text.Primary to keep the same color. Make it close to foreground color so it doesn't become invisible on ListItem.Background.Selected when item is selected, has to be defined after AccentColors  -->
    <SolidColorBrush x:Key="Text.Accent" Color="{StaticResource AccentF3.Color}" />

    <!--<Color x:Key="Secondary.Color">#656565</Color>-->
    <m:StaticResourceColorEx
        x:Key="Secondary.Color"
        BlendColor="#ffffff"
        Multiplier=".4"
        ResourceKey="Base.Foreground.Color" />

    <!--Metadata/extension in files list, shortcuts in menu and tooltips...
        Make sure that text in those places is still readable with selection/hover on that item-->
    <SolidColorBrush x:Key="Text.Secondary" Color="{StaticResource Secondary.Color}" />

    <!--Disabled menu items, buttons, checkboxes-->
    <m:StaticResourceColorEx
        x:Key="Text.Disabled.Color"
        BlendColor="#ffffff"
        Multiplier=".5"
        ResourceKey="Base.Foreground.Color" />




    <!--Textbox and ComboBox borders, trackbar fill-->
    <m:StaticResourceColorEx
        x:Key="GraphicElement.Color"
        BlendColor="#000000"
        Multiplier=".2"
        ResourceKey="Base.Background.Color" />
    <SolidColorBrush x:Key="GraphicElement" Color="{DynamicResource GraphicElement.Color}" />


    <SolidColorBrush
        x:Key="ListItem.Background.Hover"
        Opacity=".5"
        Color="{DynamicResource Gray20.Color}" />
    <m:StaticResourceBrushEx
        x:Key="ListItem.Background.Selected"
        BlendColor="#ffffff"
        Multiplier=".6"
        Opacity=".9"
        ResourceKey="Accent.Color" />
    <m:StaticResourceBrushEx
     x:Key="ListItem.Background.Selected.Hover"
     BlendColor="#ffffff"
     Multiplier=".57"
     Opacity=".9"
     ResourceKey="Accent.Color" />
    <SolidColorBrush x:Key="ListItem.Background.DragEnter" Color="{StaticResource AccentB3.Color}" />



    <s:Double x:Key="Button.MinSize">24</s:Double>
    <Thickness x:Key="Button.Padding">4,0,4,0</Thickness>

    <!--COMMON ELEMENTS -->

    <SolidColorBrush x:Key="IconButton.Background" Color="#55ffffff" />
    <SolidColorBrush x:Key="Button.Background" Color="{StaticResource Gray10.Color}" />
    <SolidColorBrush x:Key="Button.Background.Hover" Color="{StaticResource Gray20.Color}" />
    <SolidColorBrush x:Key="Button.Background.Pressed" Color="{DynamicResource Gray30.Color}" />
    <SolidColorBrush x:Key="Button.Background.Disabled" Color="{StaticResource Base.Background.Color}" />

    <SolidColorBrush x:Key="Button.Foreground" Color="{StaticResource Base.Foreground.Color}" />
    <SolidColorBrush x:Key="Button.Foreground.Hover" Color="{StaticResource Base.Foreground.Color}" />
    <SolidColorBrush x:Key="Button.Foreground.Pressed" Color="{StaticResource Base.Foreground.Color}" />
    <SolidColorBrush x:Key="Button.Foreground.Disabled" Color="{StaticResource Text.Disabled.Color}" />

    <SolidColorBrush x:Key="Toggle.Background.Checked" Color="{DynamicResource AccentB3.Color}" />


    <SolidColorBrush x:Key="Button.Border" Color="Transparent" />
    <SolidColorBrush x:Key="Button.Border.Hover" Color="Transparent" />
    <SolidColorBrush x:Key="Button.Border.Pressed" Color="Transparent" />
    <SolidColorBrush x:Key="Button.Border.Disabled" Color="Transparent" />

    <!--Arrow buttons on resizers -->
    <SolidColorBrush x:Key="Button.Secondary.Foreground" Color="{StaticResource Secondary.Color}" />

    <SolidColorBrush x:Key="TitleBar.Button.Background" Color="Transparent" />
    <SolidColorBrush x:Key="TitleBar.Button.Background.Hover" Color="#19000000" />
    <SolidColorBrush x:Key="TitleBar.Button.Background.Pressed" Color="#33000000" />
    <SolidColorBrush x:Key="TitleBar.Button.Foreground" Color="#FF000000" />
    <SolidColorBrush x:Key="TitleBar.Button.Foreground.Hover" Color="#FF000000" />
    <SolidColorBrush x:Key="TitleBar.Button.Foreground.Pressed" Color="#FF000000" />


    <!--Taskmaster warning message background, pause state, more soon-->
    <SolidColorBrush x:Key="Warning.Background" Color="#FFFF8201" />

    <SolidColorBrush x:Key="Menu.Item.Background" Color="Transparent" />
    <SolidColorBrush x:Key="Menu.Item.Background.Hover" Color="{StaticResource Gray20.Color}" />
    <SolidColorBrush x:Key="Menu.Item.Background.Pressed" Color="{DynamicResource Gray30.Color}" />
    <SolidColorBrush x:Key="Menu.Item.Background.Disabled" Color="Transparent" />

    <SolidColorBrush x:Key="Menu.Item.Foreground" Color="{StaticResource Base.Foreground.Color}" />
    <SolidColorBrush x:Key="Menu.Item.Foreground.Hover" Color="{StaticResource Base.Foreground.Color}" />
    <SolidColorBrush x:Key="Menu.Item.Foreground.Pressed" Color="{StaticResource Base.Foreground.Color}" />
    <SolidColorBrush x:Key="Menu.Item.Foreground.Disabled" Color="{StaticResource Text.Disabled.Color}" />

    <SolidColorBrush x:Key="Menu.Item.Foreground.Shortcut" Color="{StaticResource Secondary.Color}" />

    <SolidColorBrush x:Key="Menu.Separator.Foreground" Color="{StaticResource Secondary.Color}" />
    <system:Double x:Key="Menu.Separator.Height">1</system:Double>


    <SolidColorBrush x:Key="Menu.Border" Color="Transparent" />
    <Thickness x:Key="Menu.Border.Thickness">0</Thickness>
    <Thickness x:Key="Menu.Padding">1</Thickness>
    <system:Double x:Key="Menu.MaxWidth">450</system:Double>

    <system:Double x:Key="TextBox.MinHeight">20</system:Double>
    <Thickness x:Key="TextBox.Padding">4,2,4,2</Thickness>
    <CornerRadius x:Key="TextBox.CornerRadius">2</CornerRadius>

    <SolidColorBrush x:Key="TextBox.Foreground" Color="{StaticResource Base.Foreground.Color}" />
    <SolidColorBrush x:Key="TextBox.Foreground.Disabled" Color="{StaticResource Text.Disabled.Color}" />

    <SolidColorBrush x:Key="TextBox.Selection.Foreground" Color="{StaticResource Base.Foreground.Color}" />
    <m:StaticResourceBrushEx
     x:Key="TextBox.Selection.Background"
     BlendColor="#ffffff"
     Multiplier=".5"
     Opacity="1"
     ResourceKey="Accent.Color" />

    <SolidColorBrush x:Key="TextBox.Background" Color="{StaticResource Base.Background.Color}" />
    <SolidColorBrush x:Key="TextBox.Background.Hover" Color="{StaticResource Gray10.Color}" />
    <SolidColorBrush x:Key="TextBox.Background.Focus" Color="{StaticResource Base.Background.Color}" />
    <SolidColorBrush x:Key="TextBox.Background.Disabled" Color="{StaticResource Gray30.Color}" />

    <Thickness x:Key="TextBox.Border.Thickness">1</Thickness>
    <SolidColorBrush x:Key="TextBox.Border" Color="{StaticResource Gray20.Color}" />
    <SolidColorBrush x:Key="TextBox.Border.Hover" Color="{StaticResource AccentF3.Color}" />
    <SolidColorBrush x:Key="TextBox.Border.Focus" Color="{StaticResource Accent.Color}" />
    <SolidColorBrush x:Key="TextBox.Border.Disabled" Color="{StaticResource Gray50.Color}" />
    <!--ComboBox TextBox shares this-->


    <CornerRadius x:Key="CheckBox.CornerRadius">1</CornerRadius>

    <SolidColorBrush x:Key="CheckBox.Foreground.Disabled" Color="{StaticResource Text.Disabled.Color}" />

    <SolidColorBrush x:Key="CheckBox.Background" Color="{StaticResource Base.Background.Color}" />
    <SolidColorBrush x:Key="CheckBox.Background.Hover" Color="{DynamicResource Gray20.Color}" />
    <SolidColorBrush
        x:Key="CheckBox.Background.Pressed"
        Opacity=".5"
        Color="{StaticResource AccentF3.Color}" />
    <SolidColorBrush x:Key="CheckBox.Background.Checked" Color="{DynamicResource AccentB3.Color}" />
    <SolidColorBrush x:Key="CheckBox.Background.Disabled" Color="{DynamicResource Gray20.Color}" />




    <Thickness x:Key="CheckBox.Border.Thickness">1</Thickness>
    <SolidColorBrush x:Key="CheckBox.Border" Color="{StaticResource Base.Foreground.Color}" />
    <SolidColorBrush x:Key="CheckBox.Border.Hover" Color="{DynamicResource Accent.Color}" />
    <SolidColorBrush x:Key="CheckBox.Border.Pressed" Color="{DynamicResource Accent.Color}" />
    <SolidColorBrush x:Key="CheckBox.Border.Checked" Color="{StaticResource Accent.Color}" />
    <SolidColorBrush x:Key="CheckBox.Border.Disabled" Color="{StaticResource Gray50.Color}" />

    <SolidColorBrush x:Key="CheckBox.CheckMark" Color="{DynamicResource Base.Foreground.Color}" />


    <SolidColorBrush x:Key="ComboBoxItemPillFillBrush" Color="{DynamicResource AccentF3.Color}" />

    <CornerRadius x:Key="ComboBox.Popup.CornerRadius">2</CornerRadius>
    <Thickness x:Key="ComboBox.Item.Padding">4,2,4,2</Thickness>

    <Thickness x:Key="ComboBox.Padding">4,2,4,2</Thickness>

    <SolidColorBrush x:Key="ComboBox.Chevron.Foreground" Color="{DynamicResource Base.Foreground.Color}" />
    <system:Double x:Key="ComboBox.Chevron.Size">16.0</system:Double>
    <Thickness x:Key="ComboBox.Chevron.Margin">8,0,4,0</Thickness>

    <SolidColorBrush x:Key="ComboBox.Popup.Background" Color="{DynamicResource Gray10.Color}" />
    <SolidColorBrush x:Key="ComboBox.Popup.Border" Color="{DynamicResource AccentF3.Color}" />
    <SolidColorBrush x:Key="ComboBox.Popup.Background.Disabled" Color="{StaticResource Gray50.Color}" />
    <SolidColorBrush x:Key="ComboBox.Border.Focus" Color="{DynamicResource Accent.Color}" />
    <Thickness x:Key="ComboBox.Border.Focus.Thickness">1</Thickness>

    <system:Double x:Key="ComboBox.Popup.MinHeight">32.0</system:Double>

    <system:Double x:Key="Slider.Thumb.Size">20</system:Double>
    <system:Double x:Key="Slider.Thumb.Border.Size">1</system:Double>

    <SolidColorBrush x:Key="Slider.Thumb.Background" Color="{DynamicResource Accent.Color}" />
    <SolidColorBrush x:Key="Slider.Thumb.Background.PointerOver" Color="{StaticResource AccentF3.Color}" />
    <SolidColorBrush x:Key="Slider.Thumb.Background.Disabled" Color="{DynamicResource AccentB3.Color}" />
    <SolidColorBrush x:Key="Slider.Thumb.Border" Color="{StaticResource AccentF2.Color}" />

    <system:Double x:Key="Slider.Track.Size">2.0</system:Double>
    <SolidColorBrush x:Key="Slider.Track.Fill.Accent" Color="{DynamicResource Accent.Color}" />
    <SolidColorBrush x:Key="Slider.Track.Fill" Color="{DynamicResource GraphicElement.Color}" />
    <SolidColorBrush x:Key="Slider.Track.Fill.PointerOver" Color="{StaticResource AccentF1.Color}" />
    <SolidColorBrush x:Key="Slider.TickBar.Fill" Color="{DynamicResource GraphicElement.Color}" />

    <SolidColorBrush x:Key="ProgressBar.Background" Color="{DynamicResource Gray10.Color}" />
    <SolidColorBrush x:Key="ProgressBar.Track.Fill" Color="{DynamicResource Accent.Color}" />
    <SolidColorBrush x:Key="ProgressBar.Border" Color="{DynamicResource Gray10.Color}" />

    <Style x:Key="GroupBox.Header.TextBlock" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{DynamicResource Text.Primary}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="{m:FontSizeOffset Offset=4}" />
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>

    <!--end of COMMON ELEMENTS-->
</ResourceDictionary>