Fix coloring issues and added an option to configure media menu border. (#135)

* Fix coloring issues and added an option to configure media menu border.

* Updated and added options to style radio and check butto ns.

* Update themes to reflect the changes
This commit is contained in:
Jas Singh
2024-08-15 23:09:18 -07:00
committed by GitHub
parent 0ba89aae4a
commit f3a690026b
17 changed files with 101 additions and 65 deletions

View File

@@ -4,9 +4,14 @@ import { getMatugenVariations } from "./variations";
import { bash, dependencies, Notify, isAnImage } from "lib/utils";
import options from "options";
import icons from "lib/icons";
import { Variable } from "types/variable";
const { scheme_type, contrast } = options.theme.matugen_settings;
const { matugen } = options.theme;
const updateOptColor = (color: HexColor, opt: Variable<HexColor>) => {
opt.value = color;
}
export async function generateMatugenColors(): Promise<MatugenColors | undefined> {
if (!matugen.value || !dependencies('matugen')) {
return;
@@ -43,6 +48,7 @@ export const replaceHexValues = (incomingHex: HexColor, matugenColors: MatugenCo
}
const matugenVariation = getMatugenVariations(matugenColors, options.theme.matugen_settings.variation.value);
updateOptColor(matugenVariation.base, options.theme.bar.menus.menu.media.card.color as Variable<HexColor>);
for (let curColor of Object.keys(defaultColorMap)) {
if (defaultColorMap[curColor] === incomingHex) {
return matugenVariation[curColor];