Skip to content

Commit

Permalink
restyled
Browse files Browse the repository at this point in the history
  • Loading branch information
Jariel Que committed Jul 22, 2022
2 parents c6843be + 738f50c commit a7225fc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
3 changes: 2 additions & 1 deletion public/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ defaultColorScheme = {
initialSettings = Object.keys(defaultColorScheme);

// loop through all the keys in the defaultColorScheme object
// and set the value of the key to the value of the key in the defaultColorScheme object
// and set the value of the key to the value of the key in the
// defaultColorScheme object
chrome.runtime.onInstalled.addListener(() => {
initialSettings.forEach((initialSetting) => {
var key = {};
Expand Down
2 changes: 1 addition & 1 deletion src/methods/complicatedGroups.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ inset 0 0.15em 0.3em #01040926 => __color_btn_shadow_active

inset 0 1px 0 #ffffff07 => __color_btn_outline_hover_inset_shadow

screen => __color_diff_blob_selected_line_highlight_mix_blend_mode
screen => __color_diff_blob_selected_line_highlight_mix_blend_mode
2 changes: 1 addition & 1 deletion src/methods/schemeGen.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*global chrome*/
import chroma from "chroma-js";

import * as settings from "./colorGroups.js";
import { pintSetNoReload, updateMultiple } from "./helper.js";
import * as qs from "./quickScheme.js";
import * as settings from "./colorGroups.js";

// function to convert hex to rgb
export function hexToRgb(hex) {
Expand Down
21 changes: 12 additions & 9 deletions tools/cgGen.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
with open('schemeGroups.js', 'a') as f:
x = open('colors.txt', 'r')
prev_line = ''
prevComparison = ''
with open("schemeGroups.js", "a") as f:
x = open("colors.txt", "r")
prev_line = ""
prevComparison = ""
groupNumber = 0

for current_line in x:
value = current_line.split("=>")[0].strip()
varName = current_line.split("=>")[0].strip().replace("#", "")
if prev_line.split("=>")[0].strip() != current_line.split("=>")[0].strip():
if prev_line.split("=>")[0].strip() != current_line.split(
"=>")[0].strip():
if prevComparison != value[0:7]:
groupNumber += 1
alphaValue = 0
f.write(']\n\n// color group: ' + str(groupNumber) + ' | default color: ' +
value + '\nexport var cg' + str(groupNumber) + '_' + varName + ' = [\n')
f.write("]\n\n// color group: " + str(groupNumber) +
" | default color: " + value + "\nexport var cg" +
str(groupNumber) + "_" + varName + " = [\n")
else:
f.write(']\n\n// color group: ' + str(groupNumber) + ' | default color: ' +
value + '\nexport var cg' + str(groupNumber) + 'a_' + value[7:9] + ' = [\n')
f.write("]\n\n// color group: " + str(groupNumber) +
" | default color: " + value + "\nexport var cg" +
str(groupNumber) + "a_" + value[7:9] + " = [\n")
f.write('"' + current_line.split("=>")[1].strip() + '",\n')
prev_line = current_line
prevComparison = value[0:7]
Expand Down
19 changes: 10 additions & 9 deletions tools/csstosort.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
with open('formatted.txt', 'a') as f:
x = open('colors.txt','r')
prev_line = ''
with open("formatted.txt", "a") as f:
x = open("colors.txt", "r")
prev_line = ""

for current_line in x:
if prev_line.split("=>")[0].strip() != current_line.split("=>")[0].strip():
f.write('\n')
f.write(current_line)
prev_line = current_line
for current_line in x:
if prev_line.split("=>")[0].strip() != current_line.split(
"=>")[0].strip():
f.write("\n")
f.write(current_line)
prev_line = current_line

x.close()
x.close()

0 comments on commit a7225fc

Please sign in to comment.