| 9 | namespace winrt::TranslucentTB::Xaml::Models::implementation |
| 10 | { |
| 11 | struct FluentColorPalette : FluentColorPaletteT<FluentColorPalette> |
| 12 | { |
| 13 | private: |
| 14 | /* Values were taken from the Settings App, Personalization > Colors which match with |
| 15 | * https://docs.microsoft.com/en-us/windows/uwp/whats-new/windows-docs-december-2017 |
| 16 | * |
| 17 | * The default ordering and grouping of colors was undesirable so was modified. |
| 18 | * Colors were transposed: the colors in rows within the Settings app became columns here. |
| 19 | * This is because columns in an IColorPalette generally should contain different shades of |
| 20 | * the same color. In the settings app this concept is somewhat loosely reversed. |
| 21 | * The first 'column' ordering, after being transposed, was then reversed so 'red' colors |
| 22 | * were near to each other. |
| 23 | * |
| 24 | * This new ordering most closely follows the Windows standard while: |
| 25 | * |
| 26 | * 1. Keeping colors in a 'spectrum' order |
| 27 | * 2. Keeping like colors next to each both in rows and columns |
| 28 | * (which is unique for the windows palette). |
| 29 | * For example, similar red colors are next to each other in both |
| 30 | * rows within the same column and rows within the column next to it. |
| 31 | * This follows a 'snake-like' pattern as illustrated below. |
| 32 | * 3. A downside of this ordering is colors don't follow strict 'shades' |
| 33 | * as in other palettes. |
| 34 | * |
| 35 | * The colors will be displayed in the below pattern. |
| 36 | * This pattern follows a spectrum while keeping like-colors near to one |
| 37 | * another across both rows and columns. |
| 38 | * |
| 39 | * ┌Red───┐ ┌Blue──┐ ┌Gray──┐ |
| 40 | * │ │ │ │ │ | |
| 41 | * │ │ │ │ │ | |
| 42 | * Yellow └Violet┘ └Green─┘ Brown |
| 43 | */ |
| 44 | static constexpr std::array<std::array<Windows::UI::Color, 8>, 6> COLOR_CHART = {{ |
| 45 | {{ |
| 46 | // Ordering reversed for this section only |
| 47 | { 255, 255, 67, 67 }, // #FF4343 |
| 48 | { 255, 209, 52, 56 }, // #D13438 |
| 49 | { 255, 239, 105, 80 }, // #EF6950 |
| 50 | { 255, 218, 59, 1 }, // #DA3B01 |
| 51 | { 255, 202, 80, 16 }, // #CA5010 |
| 52 | { 255, 247, 99, 12 }, // #F7630C |
| 53 | { 255, 255, 140, 0 }, // #FF8C00 |
| 54 | { 255, 255, 185, 0 } // #FFB900 |
| 55 | }}, |
| 56 | {{ |
| 57 | { 255, 231, 72, 86 }, // #E74856 |
| 58 | { 255, 232, 17, 35 }, // #E81123 |
| 59 | { 255, 234, 0, 94 }, // #EA005E |
| 60 | { 255, 195, 0, 82 }, // #C30052 |
| 61 | { 255, 227, 0, 140 }, // #E3008C |
| 62 | { 255, 191, 0, 119 }, // #BF0077 |
| 63 | { 255, 194, 57, 179 }, // #C239B3 |
| 64 | { 255, 154, 0, 137 }, // #9A0089 |
| 65 | }}, |
| 66 | {{ |
| 67 | { 255, 0, 120, 215 }, // #0078D7 |
| 68 | { 255, 0, 99, 177 }, // #0063B1 |
nothing calls this directly
no outgoing calls
no test coverage detected