diff --git a/public/pint-css.css b/public/pint-css.css index f4fd2ca..aa8a7c0 100644 --- a/public/pint-css.css +++ b/public/pint-css.css @@ -464,10 +464,10 @@ html, body { stroke: var(--color-calendar-graph-day-L4-bg) !important; } -a,p { +/* a,p { color: var(--color-scale-gray-1) !important; } span { color: var(--color-scale-gray-0) !important; -} \ No newline at end of file +} */ \ No newline at end of file diff --git a/src/components/popup/QuickChange.tsx b/src/components/popup/QuickChange.tsx index bd926b2..4c32944 100644 --- a/src/components/popup/QuickChange.tsx +++ b/src/components/popup/QuickChange.tsx @@ -7,7 +7,7 @@ import Preview from "../global/Preview"; import CardTitle from "../global/CardTitle"; import { pintSet, pintSetNoReload, updateMultiple, pintGetUpdate } from "../../methods/helper"; import * as quickScheme from "../../methods/quickScheme"; -import { bgGen, generateAccent, updateViaQuickScheme, } from "../../methods/schemeGen"; +import { bgGen, generateAccent, updateText, updateViaQuickScheme, } from "../../methods/schemeGen"; import { bgcolor } from "@mui/system"; var defaultValue = "#c0ffee" @@ -26,10 +26,12 @@ export default function QuickChange() { pintGetUpdate("__color_btn_primary_active_bg", setActiveButton) pintGetUpdate("__color_btn_primary_focus_bg", setClickedButton) pintGetUpdate("__color_btn_primary_disabled_bg", setDisabledButton) + pintGetUpdate("__color_scale_gray_1", setTextColor) }) const [bgColor, setBgColor] = react.useState(`${defaultValue}`); const [color, setColor] = react.useState(`${defaultValue}`); + const [textColor, setTextColor] = react.useState(`${defaultValue}`); // l1-l4 and other used shit const [l1, setL1] = react.useState(`${defaultValue}`); @@ -53,6 +55,11 @@ export default function QuickChange() { bgGen(color); } + function paintText() { + updateText(color); + setTextColor(color); + } + return (
@@ -103,13 +110,13 @@ export default function QuickChange() { id="textColorHex" label="text color" disabled={true} - value={bgColor} + value={textColor} variant="outlined" size="small" /> diff --git a/src/methods/quickScheme.js b/src/methods/quickScheme.js index 7381b56..f78eeb1 100644 --- a/src/methods/quickScheme.js +++ b/src/methods/quickScheme.js @@ -1,14 +1,14 @@ // background export var ScaleBlack = [ - "__color_checks_bg", - "__color_switch_track_bg", - "__color_canvas_inset", - "__color_shadow_medium", - "__color_shadow_large", - "__color_shadow_extra_large", - "__color_scale_black", - ]; + "__color_checks_bg", + "__color_switch_track_bg", + "__color_canvas_inset", + "__color_shadow_medium", + "__color_shadow_large", + "__color_shadow_extra_large", + "__color_scale_black", +]; export var BG9 = [ "__color_page_header_bg", @@ -66,115 +66,122 @@ export var BG6 = [ ]; export var BG5 = [ -"__color_prettylights_syntax_sublimelinter_gutter_mark", -"__color_select_menu_backdrop_border", -"__color_ans_Iblack", -"__color_switch_knob_checked_disabled_bg", -"__color_primer_fg_disabled", -"__color_scale_gray_5", -] + "__color_prettylights_syntax_sublimelinter_gutter_mark", + "__color_select_menu_backdrop_border", + "__color_ans_Iblack", + "__color_switch_knob_checked_disabled_bg", + "__color_primer_fg_disabled", + "__color_scale_gray_5", +]; export var BG4 = [ -"__color_codemirror_guttermarker_subtle_text", -"__color_checks_input_placeholder_text", -"__color_checks_line_num_text", -"__color_checks_line_timestamp_text", -"__color_checks_logline_num_text", -"__color_checks_logline_error_num_text", -"__color_checks_ans_Igray", -"__color_ans_Iblack_bright", -"__color_ans_Igray", -"__color_btn_active_border", -"__color_underlinenav_icon", -"__color_switch_track_border", -"__color_fg_subtle", -"__color_neutral_emphasis_plus", -"__color_neutral_emphasis", -"__color_scale_gray_4", -] + "__color_codemirror_guttermarker_subtle_text", + "__color_checks_input_placeholder_text", + "__color_checks_line_num_text", + "__color_checks_line_timestamp_text", + "__color_checks_logline_num_text", + "__color_checks_logline_error_num_text", + "__color_checks_ans_Igray", + "__color_ans_Iblack_bright", + "__color_ans_Igray", + "__color_btn_active_border", + "__color_underlinenav_icon", + "__color_switch_track_border", + "__color_fg_subtle", + "__color_neutral_emphasis_plus", + "__color_neutral_emphasis", + "__color_scale_gray_4", +]; export var BG3 = [ - "__color_diff_blob_expander_icon", - "__color_prettylights_syntax_comment", - "__color_prettylights_syntax_brackethighlighter_angle", - "__color_codemirror_linenumber_text", - "__color_codemirror_syntax_comment", - "__color_checks_text_secondary", - "__color_checks_btn_icon", - "__color_checks_input_text", - "__color_checks_donut_neutral", - "__color_checks_header_label_text", - "__color_checks_header_icon", - "__color_checks_line_text", - "__color_checks_gate_text", - "__color_checks_logline_text", - "__color_checks_logline_error_text", - "__color_checks_logline_warning_text", - "__color_header_divider", - "__color_btn_hover_border", - "__color_btn_focus_border", - "__color_fg_muted", - "__color_scale_gray_3", -] + "__color_diff_blob_expander_icon", + "__color_prettylights_syntax_comment", + "__color_prettylights_syntax_brackethighlighter_angle", + "__color_codemirror_linenumber_text", + "__color_codemirror_syntax_comment", + "__color_checks_text_secondary", + "__color_checks_btn_icon", + "__color_checks_input_text", + "__color_checks_donut_neutral", + "__color_checks_header_label_text", + "__color_checks_header_icon", + "__color_checks_line_text", + "__color_checks_gate_text", + "__color_checks_logline_text", + "__color_checks_logline_error_text", + "__color_checks_logline_warning_text", + "__color_header_divider", + "__color_btn_hover_border", + "__color_btn_focus_border", + "__color_fg_muted", + "__color_scale_gray_3", +]; export var BG2 = [ - "__color_checks_ans_Iwhite", - "__color_checks_ans_Iwhite_bright", - "__color_ans_Iwhite", - "__color_scale_gray_2", -] + "__color_checks_ans_Iwhite", + "__color_checks_ans_Iwhite_bright", + "__color_ans_Iwhite", + "__color_scale_gray_2", +]; export var BG1 = [ - "__color_diff_blob_addition_num_text", - "__color_diff_blob_addition_fg", - "__color_diff_blob_deletion_num_text", - "__color_diff_blob_deletion_fg", - "__color_prettylights_syntax_storage_modifier_import", - "__color_prettylights_syntax_markup_italic", - "__color_prettylights_syntax_markup_bold", - "__color_prettylights_syntax_markup_ignored_text", - "__color_codemirror_text", - "__color_codemirror_cursor", - "__color_codemirror_matchingbracket_text", - "__color_checks_text_primary", - "__color_checks_btn_hover_icon", - "__color_checks_input_focus_text", - "__color_checks_dropdown_text", - "__color_checks_dropdown_hover_text", - "__color_checks_dropdown_btn_hover_text", - "__color_checks_header_label_open_text", - "__color_btn_text", - "__color_fg_default", - "__color_scale_gray_1", -] + "__color_diff_blob_addition_num_text", + "__color_diff_blob_addition_fg", + "__color_diff_blob_deletion_num_text", + "__color_diff_blob_deletion_fg", + "__color_prettylights_syntax_storage_modifier_import", + "__color_prettylights_syntax_markup_italic", + "__color_prettylights_syntax_markup_bold", + "__color_prettylights_syntax_markup_ignored_text", + "__color_codemirror_text", + "__color_codemirror_cursor", + "__color_codemirror_matchingbracket_text", + "__color_checks_text_primary", + "__color_checks_btn_hover_icon", + "__color_checks_input_focus_text", + "__color_checks_dropdown_text", + "__color_checks_dropdown_hover_text", + "__color_checks_dropdown_btn_hover_text", + "__color_checks_header_label_open_text", + "__color_btn_text", + "__color_fg_default", + "__color_scale_gray_1", +]; export var BG0 = [ - "__color_prettylights_syntax_invalid_illegal_text", - "__color_prettylights_syntax_carriage_return_text", - "__color_header_logo", - "__color_scale_gray_0", -] + "__color_prettylights_syntax_invalid_illegal_text", + "__color_prettylights_syntax_carriage_return_text", + "__color_header_logo", + "__color_scale_gray_0", +]; // possibly text color/icon? export var ScaleWhite = [ - "__color_checks_line_dt_fm_text", - "__color_ans_Iwhite_bright", - "__color_btn_primary_text", - "__color_btn_primary_icon", - "__color_btn_outline_selected_text", - "__color_btn_danger_hover_text", - "__color_btn_danger_hover_icon", - "__color_btn_danger_selected_text", - "__color_fg_on_emphasis", - "__color_scale_white", -] + "__color_checks_line_dt_fm_text", + "__color_ans_Iwhite_bright", + "__color_btn_primary_text", + "__color_btn_primary_icon", + "__color_btn_outline_selected_text", + "__color_btn_danger_hover_text", + "__color_btn_danger_hover_icon", + "__color_btn_danger_selected_text", + "__color_fg_on_emphasis", + "__color_scale_white", +]; // text color export var TextColor = [ - "__color_scale_coral_9", -] + "__color_scale_coral_9", + "__color_primer_fg_disabled", + "__color_fg_subtle", + "__color_fg_muted", + "__color_diff_blob_addition_fg", + "__color_diff_blob_deletion_fg", + "__color_fg_default", + "__color_fg_on_emphasis", +]; // accents @@ -220,7 +227,7 @@ export var TextColor = [ // __color_btn_outline_selected_bg // __color_scale_blue_7 -// // blue 8 +// // blue 8 // __color_select_menu_tap_focus_bg // __color_primer_shadow_focus // __color_scale_blue_8 @@ -232,4 +239,4 @@ export var TextColor = [ // __color_ans_Ired // __color_codemirror_syntax_keyword // __color_codemirror_syntax_storage -// __color_prettylights_syntax_keyword \ No newline at end of file +// __color_prettylights_syntax_keyword diff --git a/src/methods/schemeGen.js b/src/methods/schemeGen.js index a951bff..df750d1 100644 --- a/src/methods/schemeGen.js +++ b/src/methods/schemeGen.js @@ -92,6 +92,11 @@ export function bgGen(color) { chrome.tabs.reload(); } +export function updateText(color) { + updateMultiple(qs.TextColor, color); + chrome.tabs.reload(); +} + export function accentGen(color) { } \ No newline at end of file