Six more families, three of them ones people already live in
Browse files at this commit8a5f18b4d2c8a3d421d9402480662ad5b56b5fa9Parent: a02176e- feat
- six more families, three of them ones people already live in
2 changed files +455 -7
- crates/app/src/main.rs +20 -0
- crates/app/src/ui/theme.rs +435 -7
crates/app/src/main.rsmodified+20 -0
| @@ -10707,6 +10707,26 @@ mod tests { | ||
| 10707 | 10707 | }), |
| 10708 | 10708 | (0., 0.) |
| 10709 | 10709 | ); |
| 10710 | + // The picker is the same card and the longest list in it is the palette | |
| 10711 | + // family list, which grows every time somebody asks for more colours. | |
| 10712 | + // Twelve of them still stand on screen *whole* at the floor -- so the | |
| 10713 | + // list's `overflow_y_scroll` is a safety net rather than something a | |
| 10714 | + // person has to find. The day a family makes this fail is the day the | |
| 10715 | + // card owes the affordance line the inspector and the cards carry | |
| 10716 | + // ("more below — scroll the …"): a row nobody knows is under the fold | |
| 10717 | + // is a row that is not there, and no scroll bar says it. | |
| 10718 | + let families = crate::ui::theme::PaletteId::ALL.len(); | |
| 10719 | + assert_eq!( | |
| 10720 | + menu_rows_h(families, floor), | |
| 10721 | + families as f32 * MENU_ROW_H, | |
| 10722 | + "{families} palettes no longer fit 640x360 -- the picker now needs \ | |
| 10723 | + the 'more below' line and a keyboard cursor that scrolls into view" | |
| 10724 | + ); | |
| 10725 | + // ...and the detail beside each one is short enough to survive the | |
| 10726 | + // right-hand column at that width instead of being truncated mid-word. | |
| 10727 | + for id in crate::ui::theme::PaletteId::ALL { | |
| 10728 | + assert!(id.detail().len() <= 30, "{id:?}: {:?}", id.detail()); | |
| 10729 | + } | |
| 10710 | 10730 | } |
| 10711 | 10731 | |
| 10712 | 10732 | /// Both menus, at the two things they can be opened on, and the box each |
crates/app/src/ui/theme.rsmodified+435 -7
| @@ -18,14 +18,19 @@ | ||
| 18 | 18 | //! * `violet` -- an indigo ground under one lavender accent. |
| 19 | 19 | //! * `rose` -- a neutral ground the accent alone warms, in rose. |
| 20 | 20 | //! * `amber` -- a graphite ground under one gold accent. |
| 21 | +//! * `ocean` -- a blue-black ground under one azure accent. | |
| 22 | +//! * `ice` -- the crisp one: a near-black blue ground, pale ice-blue accent. | |
| 23 | +//! * `orchid` -- a dark plum ground under one orchid accent. | |
| 24 | +//! * `nord`, `gruvbox`, `dracula` -- the three open palettes people already | |
| 25 | +//! have their editors in, mapped onto these roles rather than approximated. | |
| 21 | 26 | //! |
| 22 | -//! All six are dark: colour work is judged against its surround, and a light | |
| 27 | +//! All twelve are dark: colour work is judged against its surround, and a light | |
| 23 | 28 | //! ground pushes every clip body and every graded frame the wrong way -- which |
| 24 | -//! is why no editor of this kind ships one. All six take the clip bodies from | |
| 29 | +//! is why no editor of this kind ships one. All twelve take the clip bodies from | |
| 25 | 30 | //! the cross-NLE kind convention (video blue, audio green, image teal, text |
| 26 | -//! purple) instead of four greys that differ by a hair, and all six are held to | |
| 27 | -//! the same measured floors: the contrast and tint guards in `main.rs` run | |
| 28 | -//! against *every* palette in [`PaletteId::ALL`], so the seventh lands gated | |
| 31 | +//! purple) instead of four greys that differ by a hair, and all twelve are held | |
| 32 | +//! to the same measured floors: the contrast and tint guards in `main.rs` run | |
| 33 | +//! against *every* palette in [`PaletteId::ALL`], so the thirteenth lands gated | |
| 29 | 34 | //! rather than untested. |
| 30 | 35 | //! |
| 31 | 36 | //! Which family is in force is the user's, picked from the toolbar's Theme |
| @@ -47,7 +52,8 @@ use std::sync::atomic::{AtomicUsize, Ordering::Relaxed}; | ||
| 47 | 52 | /// ponytail: the families are spelled out in [`PALETTES`] rather than derived |
| 48 | 53 | /// from a second list -- `macro_rules!` cannot nest a repetition over families |
| 49 | 54 | /// inside one over roles, and the escape hatch for that is unstable. Ceiling: a |
| 50 | -/// seventh family is one line there, one variant in [`PaletteId`], one module. | |
| 55 | +/// thirteenth family is one line there, one variant in [`PaletteId`], one | |
| 56 | +/// module. | |
| 51 | 57 | macro_rules! palette { |
| 52 | 58 | ($($name:ident: $ty:ty),+ $(,)?) => { |
| 53 | 59 | /// One family's numbers, in a struct so the set can be swapped whole. |
| @@ -66,6 +72,12 @@ macro_rules! palette { | ||
| 66 | 72 | Palette { $($name: violet::$name,)+ }, |
| 67 | 73 | Palette { $($name: rose::$name,)+ }, |
| 68 | 74 | Palette { $($name: amber::$name,)+ }, |
| 75 | + Palette { $($name: ocean::$name,)+ }, | |
| 76 | + Palette { $($name: ice::$name,)+ }, | |
| 77 | + Palette { $($name: orchid::$name,)+ }, | |
| 78 | + Palette { $($name: nord::$name,)+ }, | |
| 79 | + Palette { $($name: gruvbox::$name,)+ }, | |
| 80 | + Palette { $($name: dracula::$name,)+ }, | |
| 69 | 81 | ]; |
| 70 | 82 | |
| 71 | 83 | $( |
| @@ -126,19 +138,31 @@ pub enum PaletteId { | ||
| 126 | 138 | Violet, |
| 127 | 139 | Rose, |
| 128 | 140 | Amber, |
| 141 | + Ocean, | |
| 142 | + Ice, | |
| 143 | + Orchid, | |
| 144 | + Nord, | |
| 145 | + Gruvbox, | |
| 146 | + Dracula, | |
| 129 | 147 | } |
| 130 | 148 | |
| 131 | 149 | impl PaletteId { |
| 132 | 150 | /// Display order -- the picker lists them in it, and the index into |
| 133 | 151 | /// [`PALETTES`] *is* the position in it, so this order and that array are |
| 134 | 152 | /// the same order or every colour is wrong. |
| 135 | - pub const ALL: [PaletteId; 6] = [ | |
| 153 | + pub const ALL: [PaletteId; 12] = [ | |
| 136 | 154 | PaletteId::Cool, |
| 137 | 155 | PaletteId::Warm, |
| 138 | 156 | PaletteId::Forest, |
| 139 | 157 | PaletteId::Violet, |
| 140 | 158 | PaletteId::Rose, |
| 141 | 159 | PaletteId::Amber, |
| 160 | + PaletteId::Ocean, | |
| 161 | + PaletteId::Ice, | |
| 162 | + PaletteId::Orchid, | |
| 163 | + PaletteId::Nord, | |
| 164 | + PaletteId::Gruvbox, | |
| 165 | + PaletteId::Dracula, | |
| 142 | 166 | ]; |
| 143 | 167 | |
| 144 | 168 | /// What the button and the picker row call it. |
| @@ -150,6 +174,12 @@ impl PaletteId { | ||
| 150 | 174 | PaletteId::Violet => "Violet", |
| 151 | 175 | PaletteId::Rose => "Rose", |
| 152 | 176 | PaletteId::Amber => "Amber", |
| 177 | + PaletteId::Ocean => "Ocean", | |
| 178 | + PaletteId::Ice => "Ice", | |
| 179 | + PaletteId::Orchid => "Orchid", | |
| 180 | + PaletteId::Nord => "Nord", | |
| 181 | + PaletteId::Gruvbox => "Gruvbox", | |
| 182 | + PaletteId::Dracula => "Dracula", | |
| 153 | 183 | } |
| 154 | 184 | } |
| 155 | 185 | |
| @@ -166,6 +196,12 @@ impl PaletteId { | ||
| 166 | 196 | PaletteId::Violet => "indigo ground, lavender", |
| 167 | 197 | PaletteId::Rose => "neutral ground, rose", |
| 168 | 198 | PaletteId::Amber => "graphite ground, gold", |
| 199 | + PaletteId::Ocean => "blue-black ground, azure", | |
| 200 | + PaletteId::Ice => "near-black blue, pale ice", | |
| 201 | + PaletteId::Orchid => "plum ground, orchid accent", | |
| 202 | + PaletteId::Nord => "polar night, frost accent", | |
| 203 | + PaletteId::Gruvbox => "retro brown, gruvbox orange", | |
| 204 | + PaletteId::Dracula => "dracula ground, pink accent", | |
| 169 | 205 | } |
| 170 | 206 | } |
| 171 | 207 | |
| @@ -179,6 +215,12 @@ impl PaletteId { | ||
| 179 | 215 | PaletteId::Violet => "violet", |
| 180 | 216 | PaletteId::Rose => "rose", |
| 181 | 217 | PaletteId::Amber => "amber", |
| 218 | + PaletteId::Ocean => "ocean", | |
| 219 | + PaletteId::Ice => "ice", | |
| 220 | + PaletteId::Orchid => "orchid", | |
| 221 | + PaletteId::Nord => "nord", | |
| 222 | + PaletteId::Gruvbox => "gruvbox", | |
| 223 | + PaletteId::Dracula => "dracula", | |
| 182 | 224 | } |
| 183 | 225 | } |
| 184 | 226 | |
| @@ -650,6 +692,392 @@ pub mod amber { | ||
| 650 | 692 | pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0]; |
| 651 | 693 | } |
| 652 | 694 | |
| 695 | +/// Family G: a blue-black ground -- deeper and bluer than `cool`'s neutral -- | |
| 696 | +/// under one azure accent. Where `cool` is a grey that leans cold, this one is | |
| 697 | +/// water: the panels themselves carry the hue and the accent is the light on it. | |
| 698 | +pub mod ocean { | |
| 699 | + // -- surfaces --------------------------------------------------------------- | |
| 700 | + pub const BG_CANVAS: u32 = 0x05080f; | |
| 701 | + pub const BG_PANEL: u32 = 0x0d1524; | |
| 702 | + pub const BG_RAISED: u32 = 0x172436; | |
| 703 | + pub const BG_TIMELINE: u32 = 0x08101c; | |
| 704 | + pub const BG_HOVER: u32 = 0x223449; | |
| 705 | + pub const BG_HOVER_DIM: u32 = 0x14202f; | |
| 706 | + pub const BG_SELECTED: u32 = 0x0f3a6b; | |
| 707 | + pub const SCRIM: u32 = 0x05080fcc; | |
| 708 | + pub const SCRIM_LIGHT: u32 = 0x05080f55; | |
| 709 | + | |
| 710 | + // -- strokes ---------------------------------------------------------------- | |
| 711 | + pub const STROKE_DIVIDER: u32 = 0x1e2d42; | |
| 712 | + /// Gold, not azure: on a blue ground the accent is the one hue the chrome is | |
| 713 | + /// full of, and a focus ring wearing it says nothing. | |
| 714 | + pub const STROKE_FOCUS: u32 = 0xffd166; | |
| 715 | + pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | |
| 716 | + | |
| 717 | + // -- text ------------------------------------------------------------------- | |
| 718 | + pub const FG_PRIMARY: u32 = 0xe6eefb; | |
| 719 | + pub const FG_SECONDARY: u32 = 0xa4bcd8; | |
| 720 | + pub const FG_DISABLED: u32 = 0x6b8199; | |
| 721 | + | |
| 722 | + // -- interaction ------------------------------------------------------------ | |
| 723 | + pub const ACCENT_PRIMARY: u32 = 0x38bdf8; | |
| 724 | + pub const ACCENT_HOVER: u32 = 0x7dd3fc; | |
| 725 | + pub const ACCENT_PLAYHEAD: u32 = 0xff9db0; | |
| 726 | + pub const ACCENT_WASH: u32 = 0x38bdf8aa; | |
| 727 | + | |
| 728 | + // -- clip kinds ------------------------------------------------------------- | |
| 729 | + pub const CLIP_VIDEO: u32 = 0x2f5a9e; | |
| 730 | + pub const CLIP_AUDIO: u32 = 0x2c6b49; | |
| 731 | + pub const CLIP_IMAGE: u32 = 0x1c6270; | |
| 732 | + pub const CLIP_TEXT: u32 = 0x6b46c1; | |
| 733 | + | |
| 734 | + pub const SOURCE_TINTS: [u32; 4] = [0x5fa8e8, 0xe8a95f, 0x5fd6a0, 0xc98fe8]; | |
| 735 | + | |
| 736 | + // -- feedback --------------------------------------------------------------- | |
| 737 | + pub const STATUS_ERROR: u32 = 0xf05252; | |
| 738 | + pub const STATUS_WARNING: u32 = 0xfbbf24; | |
| 739 | + pub const STATUS_SUCCESS: u32 = 0x4ade80; | |
| 740 | + pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY; | |
| 741 | + pub const DROP_REFUSE: u32 = 0x8a2740; | |
| 742 | + | |
| 743 | + // -- subtitles -------------------------------------------------------------- | |
| 744 | + pub const SUB_FG: u32 = 0xffffff; | |
| 745 | + pub const SUB_SHADE: u32 = 0x000000cc; | |
| 746 | + | |
| 747 | + // -- the equalizer graph and the histogram ---------------------------------- | |
| 748 | + pub const EQ_GRID: u32 = 0x1e2d42; | |
| 749 | + pub const EQ_SPECTRUM_INK: u32 = 0xa4bcd866; | |
| 750 | + pub const EQ_FILL_INK: u32 = 0x38bdf826; | |
| 751 | + pub const EQ_BELL_INK: u32 = 0x38bdf866; | |
| 752 | + pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0]; | |
| 753 | +} | |
| 754 | + | |
| 755 | +/// Family H: the crisp one. A near-black blue ground with the widest ink range | |
| 756 | +/// in the set -- the primary text is nearly white and the canvas nearly black -- | |
| 757 | +/// under a pale ice-blue accent, for the long grade where every other family | |
| 758 | +/// starts to read as soft. | |
| 759 | +pub mod ice { | |
| 760 | + // -- surfaces --------------------------------------------------------------- | |
| 761 | + pub const BG_CANVAS: u32 = 0x03060a; | |
| 762 | + pub const BG_PANEL: u32 = 0x0b131c; | |
| 763 | + pub const BG_RAISED: u32 = 0x18232f; | |
| 764 | + pub const BG_TIMELINE: u32 = 0x060d15; | |
| 765 | + pub const BG_HOVER: u32 = 0x24323f; | |
| 766 | + pub const BG_HOVER_DIM: u32 = 0x121c26; | |
| 767 | + /// A steel blue rather than the accent: ice at surface brightness is nearly | |
| 768 | + /// white and would carry no ink at all (WCAG 1.4.3). | |
| 769 | + pub const BG_SELECTED: u32 = 0x14476b; | |
| 770 | + pub const SCRIM: u32 = 0x03060acc; | |
| 771 | + pub const SCRIM_LIGHT: u32 = 0x03060a55; | |
| 772 | + | |
| 773 | + // -- strokes ---------------------------------------------------------------- | |
| 774 | + pub const STROKE_DIVIDER: u32 = 0x223140; | |
| 775 | + pub const STROKE_FOCUS: u32 = 0xfcd34d; | |
| 776 | + pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | |
| 777 | + | |
| 778 | + // -- text ------------------------------------------------------------------- | |
| 779 | + pub const FG_PRIMARY: u32 = 0xf4fafe; | |
| 780 | + pub const FG_SECONDARY: u32 = 0xb8cfe0; | |
| 781 | + pub const FG_DISABLED: u32 = 0x71889b; | |
| 782 | + | |
| 783 | + // -- interaction ------------------------------------------------------------ | |
| 784 | + pub const ACCENT_PRIMARY: u32 = 0xa5f3fc; | |
| 785 | + pub const ACCENT_HOVER: u32 = 0xcffafe; | |
| 786 | + pub const ACCENT_PLAYHEAD: u32 = 0xff8fa3; | |
| 787 | + pub const ACCENT_WASH: u32 = 0xa5f3fcaa; | |
| 788 | + | |
| 789 | + // -- clip kinds ------------------------------------------------------------- | |
| 790 | + pub const CLIP_VIDEO: u32 = 0x2f5a9e; | |
| 791 | + pub const CLIP_AUDIO: u32 = 0x2c6b49; | |
| 792 | + pub const CLIP_IMAGE: u32 = 0x1c6270; | |
| 793 | + pub const CLIP_TEXT: u32 = 0x6b46c1; | |
| 794 | + | |
| 795 | + pub const SOURCE_TINTS: [u32; 4] = [0x7fd6e8, 0xe8b47f, 0x8fd69b, 0xc79be8]; | |
| 796 | + | |
| 797 | + // -- feedback --------------------------------------------------------------- | |
| 798 | + pub const STATUS_ERROR: u32 = 0xff6b6b; | |
| 799 | + pub const STATUS_WARNING: u32 = 0xfbbf24; | |
| 800 | + pub const STATUS_SUCCESS: u32 = 0x4ade80; | |
| 801 | + pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY; | |
| 802 | + pub const DROP_REFUSE: u32 = 0x8f2740; | |
| 803 | + | |
| 804 | + // -- subtitles -------------------------------------------------------------- | |
| 805 | + pub const SUB_FG: u32 = 0xffffff; | |
| 806 | + pub const SUB_SHADE: u32 = 0x000000cc; | |
| 807 | + | |
| 808 | + // -- the equalizer graph and the histogram ---------------------------------- | |
| 809 | + pub const EQ_GRID: u32 = 0x223140; | |
| 810 | + pub const EQ_SPECTRUM_INK: u32 = 0xb8cfe066; | |
| 811 | + pub const EQ_FILL_INK: u32 = 0xa5f3fc26; | |
| 812 | + pub const EQ_BELL_INK: u32 = 0xa5f3fc66; | |
| 813 | + pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0]; | |
| 814 | +} | |
| 815 | + | |
| 816 | +/// Family I: a dark plum ground under one orchid accent -- the warm end of the | |
| 817 | +/// purples, where `violet` is the cold one. The text clip is pushed towards | |
| 818 | +/// indigo here for `violet`'s reason: a text clip and "press this" may not be | |
| 819 | +/// the same purple. | |
| 820 | +pub mod orchid { | |
| 821 | + // -- surfaces --------------------------------------------------------------- | |
| 822 | + pub const BG_CANVAS: u32 = 0x0c0712; | |
| 823 | + pub const BG_PANEL: u32 = 0x1a0f24; | |
| 824 | + pub const BG_RAISED: u32 = 0x2a1a38; | |
| 825 | + pub const BG_TIMELINE: u32 = 0x120a19; | |
| 826 | + pub const BG_HOVER: u32 = 0x3b2650; | |
| 827 | + pub const BG_HOVER_DIM: u32 = 0x231530; | |
| 828 | + pub const BG_SELECTED: u32 = 0x6b1f5e; | |
| 829 | + pub const SCRIM: u32 = 0x0c0712cc; | |
| 830 | + pub const SCRIM_LIGHT: u32 = 0x0c071255; | |
| 831 | + | |
| 832 | + // -- strokes ---------------------------------------------------------------- | |
| 833 | + pub const STROKE_DIVIDER: u32 = 0x33203f; | |
| 834 | + /// Sky: the ring is neither the orchid the window is full of nor the gold | |
| 835 | + /// the playhead is, so all three are told apart at a glance. | |
| 836 | + pub const STROKE_FOCUS: u32 = 0x7dd3fc; | |
| 837 | + pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | |
| 838 | + | |
| 839 | + // -- text ------------------------------------------------------------------- | |
| 840 | + pub const FG_PRIMARY: u32 = 0xf6ecf8; | |
| 841 | + pub const FG_SECONDARY: u32 = 0xc7b0cf; | |
| 842 | + pub const FG_DISABLED: u32 = 0x8e7a97; | |
| 843 | + | |
| 844 | + // -- interaction ------------------------------------------------------------ | |
| 845 | + pub const ACCENT_PRIMARY: u32 = 0xd946ef; | |
| 846 | + pub const ACCENT_HOVER: u32 = 0xe879f9; | |
| 847 | + pub const ACCENT_PLAYHEAD: u32 = 0xfbbf24; | |
| 848 | + pub const ACCENT_WASH: u32 = 0xd946efaa; | |
| 849 | + | |
| 850 | + // -- clip kinds ------------------------------------------------------------- | |
| 851 | + pub const CLIP_VIDEO: u32 = 0x2f5a9e; | |
| 852 | + pub const CLIP_AUDIO: u32 = 0x2c6b49; | |
| 853 | + pub const CLIP_IMAGE: u32 = 0x1c6270; | |
| 854 | + pub const CLIP_TEXT: u32 = 0x5a45b8; | |
| 855 | + | |
| 856 | + pub const SOURCE_TINTS: [u32; 4] = [0xe88fd6, 0x8fc9e8, 0xe8c48f, 0x8fe8b4]; | |
| 857 | + | |
| 858 | + // -- feedback --------------------------------------------------------------- | |
| 859 | + pub const STATUS_ERROR: u32 = 0xf87171; | |
| 860 | + pub const STATUS_WARNING: u32 = 0xfb923c; | |
| 861 | + pub const STATUS_SUCCESS: u32 = 0x4ade80; | |
| 862 | + pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY; | |
| 863 | + pub const DROP_REFUSE: u32 = 0x8f2740; | |
| 864 | + | |
| 865 | + // -- subtitles -------------------------------------------------------------- | |
| 866 | + pub const SUB_FG: u32 = 0xffffff; | |
| 867 | + pub const SUB_SHADE: u32 = 0x000000cc; | |
| 868 | + | |
| 869 | + // -- the equalizer graph and the histogram ---------------------------------- | |
| 870 | + pub const EQ_GRID: u32 = 0x33203f; | |
| 871 | + pub const EQ_SPECTRUM_INK: u32 = 0xc7b0cf66; | |
| 872 | + pub const EQ_FILL_INK: u32 = 0xd946ef26; | |
| 873 | + pub const EQ_BELL_INK: u32 = 0xd946ef66; | |
| 874 | + pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0]; | |
| 875 | +} | |
| 876 | + | |
| 877 | +/// Family J: Nord, the arctic palette (arcticicestudio/nord, MIT) -- Polar | |
| 878 | +/// Night for the surfaces, Snow Storm for the ink, Frost for the accent, Aurora | |
| 879 | +/// for everything that has to mean something. Its own numbers wherever they | |
| 880 | +/// clear the floors: `nord0`..`nord3` are the panels verbatim, and the canvas | |
| 881 | +/// and the lane bed are taken one step below `nord0`, which the set does not | |
| 882 | +/// name, because a bed lighter than its panel stops reading as a hole. | |
| 883 | +/// | |
| 884 | +/// The clip bodies and the dim ink are the adapted ones. Aurora is a *text* | |
| 885 | +/// palette: `nord14` green under white is 2.6:1, and this editor draws a name | |
| 886 | +/// and a waveform on every clip body, so the four kinds are those hues taken | |
| 887 | +/// down to where WCAG 1.4.3 holds. | |
| 888 | +pub mod nord { | |
| 889 | + // -- surfaces --------------------------------------------------------------- | |
| 890 | + pub const BG_CANVAS: u32 = 0x21262e; | |
| 891 | + pub const BG_PANEL: u32 = 0x2e3440; | |
| 892 | + pub const BG_RAISED: u32 = 0x3b4252; | |
| 893 | + pub const BG_TIMELINE: u32 = 0x272c36; | |
| 894 | + pub const BG_HOVER: u32 = 0x434c5e; | |
| 895 | + pub const BG_HOVER_DIM: u32 = 0x353c4a; | |
| 896 | + /// `nord10` is Nord's own picked row and carries the dim ink at 2.9:1, so | |
| 897 | + /// the row is that blue taken down until 4.5:1 holds (WCAG 1.4.3). | |
| 898 | + pub const BG_SELECTED: u32 = 0x2e4a6e; | |
| 899 | + pub const SCRIM: u32 = 0x21262ecc; | |
| 900 | + pub const SCRIM_LIGHT: u32 = 0x21262e55; | |
| 901 | + | |
| 902 | + // -- strokes ---------------------------------------------------------------- | |
| 903 | + pub const STROKE_DIVIDER: u32 = 0x434c5e; | |
| 904 | + /// `nord12`. The Frost blue is the accent here, so the ring is Aurora's | |
| 905 | + /// orange -- and the playhead is the yellow beside it, never this. | |
| 906 | + pub const STROKE_FOCUS: u32 = 0xd08770; | |
| 907 | + pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | |
| 908 | + | |
| 909 | + // -- text ------------------------------------------------------------------- | |
| 910 | + pub const FG_PRIMARY: u32 = 0xeceff4; | |
| 911 | + pub const FG_SECONDARY: u32 = 0xd8dee9; | |
| 912 | + /// Lighter than `nord3`, which is a *surface* in Nord and only 2.6:1 on the | |
| 913 | + /// raised one: dimmed text still has to be read (WCAG 1.4.11). | |
| 914 | + pub const FG_DISABLED: u32 = 0x8a94a8; | |
| 915 | + | |
| 916 | + // -- interaction ------------------------------------------------------------ | |
| 917 | + pub const ACCENT_PRIMARY: u32 = 0x88c0d0; | |
| 918 | + pub const ACCENT_HOVER: u32 = 0x8fbcbb; | |
| 919 | + /// `nord13`. Orange (`nord12`) is the obvious playhead and is 2.3:1 on a | |
| 920 | + /// video clip -- the line has to be findable on every body it crosses. | |
| 921 | + pub const ACCENT_PLAYHEAD: u32 = 0xebcb8b; | |
| 922 | + pub const ACCENT_WASH: u32 = 0x88c0d0aa; | |
| 923 | + | |
| 924 | + // -- clip kinds (Aurora, taken down to where a name is legible on it) ------- | |
| 925 | + pub const CLIP_VIDEO: u32 = 0x3b5f8a; | |
| 926 | + pub const CLIP_AUDIO: u32 = 0x4d6b3f; | |
| 927 | + pub const CLIP_IMAGE: u32 = 0x3f6a69; | |
| 928 | + pub const CLIP_TEXT: u32 = 0x6b4a78; | |
| 929 | + | |
| 930 | + /// Aurora and Frost at full strength: a swatch carries no text, so these are | |
| 931 | + /// Nord's own numbers. | |
| 932 | + pub const SOURCE_TINTS: [u32; 4] = [0x88c0d0, 0xd08770, 0xa3be8c, 0xb48ead]; | |
| 933 | + | |
| 934 | + // -- feedback --------------------------------------------------------------- | |
| 935 | + pub const STATUS_ERROR: u32 = 0xbf616a; | |
| 936 | + pub const STATUS_WARNING: u32 = 0xd08770; | |
| 937 | + pub const STATUS_SUCCESS: u32 = 0xa3be8c; | |
| 938 | + pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY; | |
| 939 | + pub const DROP_REFUSE: u32 = 0x7a3038; | |
| 940 | + | |
| 941 | + // -- subtitles -------------------------------------------------------------- | |
| 942 | + pub const SUB_FG: u32 = 0xffffff; | |
| 943 | + pub const SUB_SHADE: u32 = 0x000000cc; | |
| 944 | + | |
| 945 | + // -- the equalizer graph and the histogram ---------------------------------- | |
| 946 | + pub const EQ_GRID: u32 = 0x434c5e; | |
| 947 | + pub const EQ_SPECTRUM_INK: u32 = 0xd8dee966; | |
| 948 | + pub const EQ_FILL_INK: u32 = 0x88c0d026; | |
| 949 | + pub const EQ_BELL_INK: u32 = 0x88c0d066; | |
| 950 | + pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0]; | |
| 951 | +} | |
| 952 | + | |
| 953 | +/// Family K: Gruvbox dark (morhetz/gruvbox, MIT) -- the retro brown-grey ground | |
| 954 | +/// and the warm ink that made it, under its own orange. `bg0_h`, `bg0`, `bg1` | |
| 955 | +/// and `bg2` are the surfaces verbatim and `fg1`..`fg4` the ink; the clip bodies | |
| 956 | +/// are the neutral-mode hues taken down for the same reason Nord's are. | |
| 957 | +/// | |
| 958 | +/// Three of its colours do three jobs here rather than one: orange is the | |
| 959 | +/// accent, green the playhead, blue the focus ring -- so the family is | |
| 960 | +/// recognisable from the chrome and not only from the ground. | |
| 961 | +pub mod gruvbox { | |
| 962 | + // -- surfaces --------------------------------------------------------------- | |
| 963 | + pub const BG_CANVAS: u32 = 0x1d2021; | |
| 964 | + pub const BG_PANEL: u32 = 0x282828; | |
| 965 | + pub const BG_RAISED: u32 = 0x3c3836; | |
| 966 | + pub const BG_TIMELINE: u32 = 0x232323; | |
| 967 | + pub const BG_HOVER: u32 = 0x504945; | |
| 968 | + pub const BG_HOVER_DIM: u32 = 0x32302f; | |
| 969 | + /// The orange taken to where `fg2` clears 4.5:1 on it -- `bg2`, gruvbox's | |
| 970 | + /// own selection, is a grey and says nothing about which row is picked. | |
| 971 | + pub const BG_SELECTED: u32 = 0x7c3f12; | |
| 972 | + pub const SCRIM: u32 = 0x1d2021cc; | |
| 973 | + pub const SCRIM_LIGHT: u32 = 0x1d202155; | |
| 974 | + | |
| 975 | + // -- strokes ---------------------------------------------------------------- | |
| 976 | + pub const STROKE_DIVIDER: u32 = 0x504945; | |
| 977 | + pub const STROKE_FOCUS: u32 = 0x83a598; | |
| 978 | + pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | |
| 979 | + | |
| 980 | + // -- text ------------------------------------------------------------------- | |
| 981 | + pub const FG_PRIMARY: u32 = 0xebdbb2; | |
| 982 | + pub const FG_SECONDARY: u32 = 0xd5c4a1; | |
| 983 | + pub const FG_DISABLED: u32 = 0xa89984; | |
| 984 | + | |
| 985 | + // -- interaction ------------------------------------------------------------ | |
| 986 | + pub const ACCENT_PRIMARY: u32 = 0xfe8019; | |
| 987 | + pub const ACCENT_HOVER: u32 = 0xfabd2f; | |
| 988 | + /// Bright green: it is the one gruvbox hue that clears 3:1 on all four clip | |
| 989 | + /// bodies at once, which is what a line crossing every one of them owes. | |
| 990 | + pub const ACCENT_PLAYHEAD: u32 = 0xb8bb26; | |
| 991 | + pub const ACCENT_WASH: u32 = 0xfe8019aa; | |
| 992 | + | |
| 993 | + // -- clip kinds ------------------------------------------------------------- | |
| 994 | + pub const CLIP_VIDEO: u32 = 0x35657e; | |
| 995 | + pub const CLIP_AUDIO: u32 = 0x4b661c; | |
| 996 | + pub const CLIP_IMAGE: u32 = 0x2f6a63; | |
| 997 | + pub const CLIP_TEXT: u32 = 0x7a4a72; | |
| 998 | + | |
| 999 | + pub const SOURCE_TINTS: [u32; 4] = [0xfe8019, 0x83a598, 0xb8bb26, 0xd3869b]; | |
| 1000 | + | |
| 1001 | + // -- feedback --------------------------------------------------------------- | |
| 1002 | + pub const STATUS_ERROR: u32 = 0xfb4934; | |
| 1003 | + pub const STATUS_WARNING: u32 = 0xfabd2f; | |
| 1004 | + pub const STATUS_SUCCESS: u32 = 0x8ec07c; | |
| 1005 | + pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY; | |
| 1006 | + pub const DROP_REFUSE: u32 = 0x9d0006; | |
| 1007 | + | |
| 1008 | + // -- subtitles -------------------------------------------------------------- | |
| 1009 | + pub const SUB_FG: u32 = 0xffffff; | |
| 1010 | + pub const SUB_SHADE: u32 = 0x000000cc; | |
| 1011 | + | |
| 1012 | + // -- the equalizer graph and the histogram ---------------------------------- | |
| 1013 | + pub const EQ_GRID: u32 = 0x504945; | |
| 1014 | + pub const EQ_SPECTRUM_INK: u32 = 0xd5c4a166; | |
| 1015 | + pub const EQ_FILL_INK: u32 = 0xfe801926; | |
| 1016 | + pub const EQ_BELL_INK: u32 = 0xfe801966; | |
| 1017 | + pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0]; | |
| 1018 | +} | |
| 1019 | + | |
| 1020 | +/// Family L: Dracula (dracula/dracula-theme, MIT) -- its background, current | |
| 1021 | +/// line and foreground verbatim, and its pink for the accent rather than the | |
| 1022 | +/// purple, which `violet` already sits on. Comment (`#6272a4`) is Dracula's dim | |
| 1023 | +/// ink and measures 2.4:1 on the raised surface, so the dim ink here is lifted | |
| 1024 | +/// and the comment blue is what a *disabled* control wears. | |
| 1025 | +pub mod dracula { | |
| 1026 | + // -- surfaces --------------------------------------------------------------- | |
| 1027 | + pub const BG_CANVAS: u32 = 0x1e1f29; | |
| 1028 | + pub const BG_PANEL: u32 = 0x282a36; | |
| 1029 | + pub const BG_RAISED: u32 = 0x343746; | |
| 1030 | + pub const BG_TIMELINE: u32 = 0x22232e; | |
| 1031 | + pub const BG_HOVER: u32 = 0x44475a; | |
| 1032 | + pub const BG_HOVER_DIM: u32 = 0x2f3141; | |
| 1033 | + pub const BG_SELECTED: u32 = 0x6b2a70; | |
| 1034 | + pub const SCRIM: u32 = 0x1e1f29cc; | |
| 1035 | + pub const SCRIM_LIGHT: u32 = 0x1e1f2955; | |
| 1036 | + | |
| 1037 | + // -- strokes ---------------------------------------------------------------- | |
| 1038 | + pub const STROKE_DIVIDER: u32 = 0x44475a; | |
| 1039 | + pub const STROKE_FOCUS: u32 = 0x8be9fd; | |
| 1040 | + pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | |
| 1041 | + | |
| 1042 | + // -- text ------------------------------------------------------------------- | |
| 1043 | + pub const FG_PRIMARY: u32 = 0xf8f8f2; | |
| 1044 | + pub const FG_SECONDARY: u32 = 0xc3c5d8; | |
| 1045 | + pub const FG_DISABLED: u32 = 0x7b8bc4; | |
| 1046 | + | |
| 1047 | + // -- interaction ------------------------------------------------------------ | |
| 1048 | + pub const ACCENT_PRIMARY: u32 = 0xff79c6; | |
| 1049 | + pub const ACCENT_HOVER: u32 = 0xff92d0; | |
| 1050 | + pub const ACCENT_PLAYHEAD: u32 = 0xf1fa8c; | |
| 1051 | + pub const ACCENT_WASH: u32 = 0xff79c6aa; | |
| 1052 | + | |
| 1053 | + // -- clip kinds ------------------------------------------------------------- | |
| 1054 | + pub const CLIP_VIDEO: u32 = 0x3f5aa6; | |
| 1055 | + pub const CLIP_AUDIO: u32 = 0x2f7a48; | |
| 1056 | + pub const CLIP_IMAGE: u32 = 0x2b6e78; | |
| 1057 | + pub const CLIP_TEXT: u32 = 0x6a3fb0; | |
| 1058 | + | |
| 1059 | + /// Dracula's own six, four of them: a swatch carries no text. | |
| 1060 | + pub const SOURCE_TINTS: [u32; 4] = [0xff79c6, 0x8be9fd, 0x50fa7b, 0xffb86c]; | |
| 1061 | + | |
| 1062 | + // -- feedback --------------------------------------------------------------- | |
| 1063 | + pub const STATUS_ERROR: u32 = 0xff5555; | |
| 1064 | + pub const STATUS_WARNING: u32 = 0xffb86c; | |
| 1065 | + pub const STATUS_SUCCESS: u32 = 0x50fa7b; | |
| 1066 | + pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY; | |
| 1067 | + pub const DROP_REFUSE: u32 = 0x8f2a3a; | |
| 1068 | + | |
| 1069 | + // -- subtitles -------------------------------------------------------------- | |
| 1070 | + pub const SUB_FG: u32 = 0xffffff; | |
| 1071 | + pub const SUB_SHADE: u32 = 0x000000cc; | |
| 1072 | + | |
| 1073 | + // -- the equalizer graph and the histogram ---------------------------------- | |
| 1074 | + pub const EQ_GRID: u32 = 0x44475a; | |
| 1075 | + pub const EQ_SPECTRUM_INK: u32 = 0xc3c5d866; | |
| 1076 | + pub const EQ_FILL_INK: u32 = 0xff79c626; | |
| 1077 | + pub const EQ_BELL_INK: u32 = 0xff79c666; | |
| 1078 | + pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0]; | |
| 1079 | +} | |
| 1080 | + | |
| 653 | 1081 | /// The box a button's glyph sits in, whatever the glyph happens to measure: the |
| 654 | 1082 | /// pause bars are 12 px wide and the play triangle 11, and a button that resized |
| 655 | 1083 | /// itself when it was pressed moved every button to its right. |