From 73717b5dd83745a3198541cf0d26d3b7c1a68899 Mon Sep 17 00:00:00 2001 From: Ilia Demianenko Date: Thu, 14 Sep 2023 00:14:19 -0700 Subject: [PATCH] Document palette colors --- doc/UIColors.md | 7 + doc/images/UIDarkPalette.svg | 500 ++++++++++++++++++++++++++++++++++ doc/images/UILightPalette.svg | 500 ++++++++++++++++++++++++++++++++++ src/ui/ui.c | 28 +- 4 files changed, 1020 insertions(+), 15 deletions(-) create mode 100644 doc/UIColors.md create mode 100644 doc/images/UIDarkPalette.svg create mode 100644 doc/images/UILightPalette.svg diff --git a/doc/UIColors.md b/doc/UIColors.md new file mode 100644 index 0000000..25f8f47 --- /dev/null +++ b/doc/UIColors.md @@ -0,0 +1,7 @@ +# UI Colors + +## Dark (default theme) +![Dark theme colors](images/UIDarkPalette.svg) + +## Light +![Light theme colors](images/UILightPalette.svg) diff --git a/doc/images/UIDarkPalette.svg b/doc/images/UIDarkPalette.svg new file mode 100644 index 0000000..b5d2ec3 --- /dev/null +++ b/doc/images/UIDarkPalette.svg @@ -0,0 +1,500 @@ + + + + + +red0 +#6C090B + +red1 +#901110 + +red2 +#B42019 + +red3 +#D73324 + +red4 +#FB4932 + +red5 +#FC725A + +red6 +#FD9983 + +red7 +#FDBEAC + +red8 +#FEE0D5 + +red9 +#FFF3EF + +orange0 +#551F03 + +orange1 +#803506 + +orange2 +#AA500A + +orange3 +#D56F0F + +orange4 +#FF9214 + +orange5 +#FFAE43 + +orange6 +#FFC772 + +orange7 +#FFDDA1 + +orange8 +#FFEFD0 + +orange9 +#FFF9ED + +amber0 +#512E09 + +amber1 +#794B0F + +amber2 +#A16B16 + +amber3 +#CA8F1E + +amber4 +#F2B726 + +amber5 +#F5CA50 + +amber6 +#F7DB7A + +amber7 +#FAEAA6 + +amber8 +#FCF6D2 + +amber9 +#FEFBED + +yellow0 +#544903 + +yellow1 +#7E6C06 + +yellow2 +#A88E0A + +yellow3 +#D2AF0F + +yellow4 +#FCCE14 + +yellow5 +#FDDE43 + +yellow6 +#FDEB71 + +yellow7 +#FEF5A0 + +yellow8 +#FEFBD0 + +yellow9 +#FFFEEC + +lime0 +#314603 + +lime1 +#4B6905 + +lime2 +#678D09 + +lime3 +#84B00C + +lime4 +#A2D311 + +lime5 +#AEDC3A + +lime6 +#BDE566 + +lime7 +#CFED96 + +lime8 +#E5F6C9 + +lime9 +#F3FBE9 + +lightGreen0 +#263D13 + +lightGreen1 +#3B5C1D + +lightGreen2 +#517B28 + +lightGreen3 +#679934 + +lightGreen4 +#7FB840 + +lightGreen5 +#97C65F + +lightGreen6 +#B0D481 + +lightGreen7 +#C9E3A7 + +lightGreen8 +#E4F1D1 + +lightGreen9 +#F3F8ED + +green0 +#123C19 + +green1 +#1C5A25 + +green2 +#277731 + +green3 +#32953D + +green4 +#3EB349 + +green5 +#5DC264 + +green6 +#7FD184 + +green7 +#A6E1A8 + +green8 +#D0F0D1 + +green9 +#ECF7EC + +teal0 +#023C39 + +teal1 +#045A55 + +teal2 +#07776F + +teal3 +#0A9588 + +teal4 +#0EB3A1 + +teal5 +#33C2B0 + +teal6 +#5ED1C1 + +teal7 +#8EE1D3 + +teal8 +#C4F0E8 + +teal9 +#E6F7F4 + +cyan0 +#04343D + +cyan1 +#074F5C + +cyan2 +#0A6C7B + +cyan3 +#0E8999 + +cyan4 +#13A8B8 + +cyan5 +#38BBC6 + +cyan6 +#62CDD4 + +cyan7 +#91DFE3 + +cyan8 +#C6EFF1 + +cyan9 +#E7F7F8 + +lightBlue0 +#003761 + +lightBlue1 +#004D85 + +lightBlue2 +#0366A9 + +lightBlue3 +#0A81CC + +lightBlue4 +#139FF0 + +lightBlue5 +#40B4F3 + +lightBlue6 +#6EC8F6 + +lightBlue7 +#9DDCF9 + +lightBlue8 +#CEEEFC + +lightBlue9 +#EBF8FE + +blue0 +#053170 + +blue1 +#0A4694 + +blue2 +#135CB8 + +blue3 +#1D75DB + +blue4 +#2990FF + +blue5 +#54A9FF + +blue6 +#7FC1FF + +blue7 +#A9D7FF + +blue8 +#D4ECFF + +blue9 +#EFF8FF + +indigo0 +#171E65 + +indigo1 +#20297A + +indigo2 +#29368E + +indigo3 +#3444A3 + +indigo4 +#4053B7 + +indigo5 +#5F71C5 + +indigo6 +#8191D4 + +indigo7 +#A7B4E2 + +indigo8 +#D1D8F1 + +indigo9 +#EDEFF8 + +violet0 +#401B77 + +violet1 +#4C248C + +violet2 +#582EA0 + +violet3 +#6439B5 + +violet4 +#7246C9 + +violet5 +#8865D4 + +violet6 +#A288DF + +violet7 +#BEADE9 + +violet8 +#DDD4F4 + +violet9 +#F1EEFA + +purple0 +#4A1061 + +purple1 +#5E1776 + +purple2 +#731F8A + +purple3 +#89289F + +purple4 +#A033B3 + +purple5 +#B553C2 + +purple6 +#CA78D1 + +purple7 +#DDA0E1 + +purple8 +#EFCEF0 + +purple9 +#F7EBF7 + +pink0 +#5C0730 + +pink1 +#800E41 + +pink2 +#A41751 + +pink3 +#C72261 + +pink4 +#EB2F71 + +pink5 +#EF5686 + +pink6 +#F37E9F + +pink7 +#F7A8BC + +pink8 +#FBD3DC + +pink9 +#FDEEF1 + +grey0 +#1C1F23 + +grey1 +#2E3238 + +grey2 +#41464C + +grey3 +#555B61 + +grey4 +#6B7075 + +grey5 +#888D92 + +grey6 +#A7ABB0 + +grey7 +#C6CACD + +grey8 +#E6E8EA + +grey9 +#F9F9F9 + +white +#FFFFFF + +black +#000000 + diff --git a/doc/images/UILightPalette.svg b/doc/images/UILightPalette.svg new file mode 100644 index 0000000..ece6630 --- /dev/null +++ b/doc/images/UILightPalette.svg @@ -0,0 +1,500 @@ + + + + + +red0 +#FEF2ED + +red1 +#FEDDD2 + +red2 +#FDB7A5 + +red3 +#FB9078 + +red4 +#FA664C + +red5 +#F93920 + +red6 +#D52515 + +red7 +#B2140C + +red8 +#8E0805 + +red9 +#6A0103 + +orange0 +#FFF8EA + +orange1 +#FEEECC + +orange2 +#FED998 + +orange3 +#FDC165 + +orange4 +#FDA633 + +orange5 +#FC8800 + +orange6 +#D26700 + +orange7 +#A84A00 + +orange8 +#7E3100 + +orange9 +#541D00 + +amber0 +#FEFBEB + +amber1 +#FCF5CE + +amber2 +#F9E89E + +amber3 +#F6D86F + +amber4 +#F3C641 + +amber5 +#F0B114 + +amber6 +#C88A0F + +amber7 +#A0660A + +amber8 +#784606 + +amber9 +#502B03 + +yellow0 +#FFFDEA + +yellow1 +#FEFBCB + +yellow2 +#FDF398 + +yellow3 +#FCE865 + +yellow4 +#FBDA32 + +yellow5 +#FAC800 + +yellow6 +#D0AA00 + +yellow7 +#A78B00 + +yellow8 +#7D6A00 + +yellow9 +#534800 + +lime0 +#F2FAE6 + +lime1 +#E3F6C5 + +lime2 +#CBED8E + +lime3 +#B7E35B + +lime4 +#A7DA2C + +lime5 +#9BD100 + +lime6 +#7EAE00 + +lime7 +#638B00 + +lime8 +#486800 + +lime9 +#2F4600 + +lightGreen0 +#F3F8EC + +lightGreen1 +#E3F0D0 + +lightGreen2 +#C8E2A5 + +lightGreen3 +#ADD37E + +lightGreen4 +#93C55B + +lightGreen5 +#7BB63C + +lightGreen6 +#649830 + +lightGreen7 +#4E7926 + +lightGreen8 +#395B1B + +lightGreen9 +#253D12 + +green0 +#ECF7EC + +green1 +#D0F0D1 + +green2 +#A4E0A7 + +green3 +#7DD182 + +green4 +#5AC262 + +green5 +#3BB346 + +green6 +#30953B + +green7 +#25772F + +green8 +#1B5924 + +green9 +#113C18 + +teal0 +#E4F7F4 + +teal1 +#C0F0E8 + +teal2 +#87E0D3 + +teal3 +#54D1C1 + +teal4 +#27C2B0 + +teal5 +#00B3A1 + +teal6 +#009589 + +teal7 +#00776F + +teal8 +#005955 + +teal9 +#003C3A + +cyan0 +#E5F7F8 + +cyan1 +#C2EFF0 + +cyan2 +#8ADDE2 + +cyan3 +#58CBD3 + +cyan4 +#2CB8C5 + +cyan5 +#05A4B6 + +cyan6 +#038698 + +cyan7 +#016979 + +cyan8 +#004D5B + +cyan9 +#00323D + +lightBlue0 +#E9F7FD + +lightBlue1 +#C9ECFC + +lightBlue2 +#95D8F8 + +lightBlue3 +#62C3F5 + +lightBlue4 +#30ACF1 + +lightBlue5 +#0095EE + +lightBlue6 +#007BCA + +lightBlue7 +#0063A7 + +lightBlue8 +#004B83 + +lightBlue9 +#00355F + +blue0 +#EAF5FF + +blue1 +#CBE7FE + +blue2 +#98CDFD + +blue3 +#65B2FC + +blue4 +#3295FB + +blue5 +#0064FA + +blue6 +#0062D6 + +blue7 +#004FB3 + +blue8 +#003D8F + +blue9 +#002C6B + +indigo0 +#ECEFF8 + +indigo1 +#D1D8F0 + +indigo2 +#A7B3E1 + +indigo3 +#8090D3 + +indigo4 +#5E6FC4 + +indigo5 +#3F51B5 + +indigo6 +#3342A1 + +indigo7 +#28348C + +indigo8 +#1F2878 + +indigo9 +#171D63 + +violet0 +#F3EDF9 + +violet1 +#E2D1F4 + +violet2 +#C4A7E9 + +violet3 +#A67FDD + +violet4 +#885BD2 + +violet5 +#6A3AC7 + +violet6 +#572FB3 + +violet7 +#46259E + +violet8 +#361C8A + +violet9 +#281475 + +purple0 +#F7E9F7 + +purple1 +#EFCAF0 + +purple2 +#DD9BE0 + +purple3 +#C96FD1 + +purple4 +#B449C2 + +purple5 +#9E28B3 + +purple6 +#871E9E + +purple7 +#71168A + +purple8 +#5C0F75 + +purple9 +#490A61 + +pink0 +#FDECEF + +pink1 +#FBCFD8 + +pink2 +#F6A0B5 + +pink3 +#F27396 + +pink4 +#ED487B + +pink5 +#E91E63 + +pink6 +#C51356 + +pink7 +#A20B48 + +pink8 +#7E053A + +pink9 +#5A012B + +grey0 +#F9F9F9 + +grey1 +#E6E8EA + +grey2 +#C6CACD + +grey3 +#A7ABB0 + +grey4 +#888D92 + +grey5 +#6B7075 + +grey6 +#555B61 + +grey7 +#41464C + +grey8 +#2E3238 + +grey9 +#1C1F23 + +white +#FFFFFF + +black +#000000 + diff --git a/src/ui/ui.c b/src/ui/ui.c index 1896092..3476168 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -3231,33 +3231,30 @@ const oc_ui_edit_command OC_UI_EDIT_COMMANDS_WINDOWS[] = { .mods = OC_KEYMOD_CTRL, .operation = OC_UI_EDIT_CUT, .move = OC_UI_EDIT_MOVE_NONE }, - { - .key = OC_KEY_DELETE, - .mods = OC_KEYMOD_SHIFT, - .operation = OC_UI_EDIT_CUT, - .move = OC_UI_EDIT_MOVE_NONE }, + { .key = OC_KEY_DELETE, + .mods = OC_KEYMOD_SHIFT, + .operation = OC_UI_EDIT_CUT, + .move = OC_UI_EDIT_MOVE_NONE }, //NOTE(martin): copy { .key = OC_KEY_C, .mods = OC_KEYMOD_CTRL, .operation = OC_UI_EDIT_COPY, .move = OC_UI_EDIT_MOVE_NONE }, - { - .key = OC_KEY_INSERT, - .mods = OC_KEYMOD_CTRL, - .operation = OC_UI_EDIT_COPY, - .move = OC_UI_EDIT_MOVE_NONE }, + { .key = OC_KEY_INSERT, + .mods = OC_KEYMOD_CTRL, + .operation = OC_UI_EDIT_COPY, + .move = OC_UI_EDIT_MOVE_NONE }, //NOTE(martin): paste { .key = OC_KEY_V, .mods = OC_KEYMOD_CTRL, .operation = OC_UI_EDIT_PASTE, .move = OC_UI_EDIT_MOVE_NONE }, - { - .key = OC_KEY_INSERT, - .mods = OC_KEYMOD_SHIFT, - .operation = OC_UI_EDIT_PASTE, - .move = OC_UI_EDIT_MOVE_NONE } + { .key = OC_KEY_INSERT, + .mods = OC_KEYMOD_SHIFT, + .operation = OC_UI_EDIT_PASTE, + .move = OC_UI_EDIT_MOVE_NONE } }; const u32 OC_UI_EDIT_COMMAND_MACOS_COUNT = sizeof(OC_UI_EDIT_COMMANDS_MACOS) / sizeof(oc_ui_edit_command); @@ -3913,6 +3910,7 @@ oc_ui_text_box_result oc_ui_text_box(const char* name, oc_arena* arena, oc_str8 //------------------------------------------------------------------------------ // Themes +// doc/UIColors.md has them visualized //------------------------------------------------------------------------------ oc_ui_palette OC_UI_DARK_PALETTE = {