From b88a2b63cfc0beee9b13253049cb86f11b0f0f7b Mon Sep 17 00:00:00 2001 From: Jariel Que Date: Tue, 26 Jul 2022 17:14:35 +0800 Subject: [PATCH 1/6] docs: fix missing image --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index c92d908..34db678 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,7 @@ [pint](https://projects.fuwa.sh/pint/) is a theming engine that allows you to rice your github experience. -![pintpreview](https://go.fuwa.sh/u/ufuvwg.png) +![image](https://user-images.githubusercontent.com/53419401/180970561-02cc824d-f4e5-4935-97f0-560d3860b05a.png)

From 40e2562e7b7d7557d4cd67377a5445d439d4c9b3 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 26 Jul 2022 09:14:53 +0000 Subject: [PATCH 2/6] Restyled by clang-format --- src/methods/helpers/scaleHelper.js | 61 +++++++++++------------------- 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/src/methods/helpers/scaleHelper.js b/src/methods/helpers/scaleHelper.js index 21df753..4db3c94 100644 --- a/src/methods/helpers/scaleHelper.js +++ b/src/methods/helpers/scaleHelper.js @@ -3,7 +3,7 @@ import ColorScheme from "color-scheme"; import * as settings from "../config/colorGroups.js"; -import { updateMultiple } from "./storageHelper.js"; +import {updateMultiple} from "./storageHelper.js"; // ----------- ASSIGNABLES ----------- export let orange = [ @@ -167,14 +167,11 @@ export function updateCalendar(color, saturate, scale) { } for (let i = 0; i < scale.length; i++) { - updateMultiple( - scale[i], - chroma(color) - .brighten(3) - .saturate(saturate) - .alpha((i + 1) * 0.2) - .hex() - ); + updateMultiple(scale[i], chroma(color) + .brighten(3) + .saturate(saturate) + .alpha((i + 1) * 0.2) + .hex()); } } @@ -197,22 +194,16 @@ export function updateSpecific(color, desaturate, saturate, scale) { for (let i = 0; i < scale.length; i++) { /^\d/.test(color.slice(-4)) - ? updateMultiple( - scale[i], - chroma(color) - .brighten(i * 0.4) - .saturate(saturate) - .desaturate(desaturate) - .hex() - ) - : updateMultiple( - scale[i], - chroma(color) - .darken(i * 0.4) - .saturate(saturate) - .desaturate(desaturate) - .hex() - ); + ? updateMultiple(scale[i], chroma(color) + .brighten(i * 0.4) + .saturate(saturate) + .desaturate(desaturate) + .hex()) + : updateMultiple(scale[i], chroma(color) + .darken(i * 0.4) + .saturate(saturate) + .desaturate(desaturate) + .hex()); } } @@ -226,10 +217,10 @@ export function updateAccent(color) { export function generateScheme(color, scheme, variation, distance) { let s = new ColorScheme(); s.from_hex(chroma(color).hex().slice(-6)) - .scheme(scheme) - .variation(variation) - .add_complement(true) - .distance(distance); + .scheme(scheme) + .variation(variation) + .add_complement(true) + .distance(distance); return s.colors(); } @@ -238,15 +229,7 @@ export function generateSaturation(color, setting) { let colors = []; for (let i = 0; i < 10; i++) { /^\d/.test(color.slice(-4)) - ? colors.push( - chroma(color) - .darken(i * 0.4) - .hex() - ) - : colors.push( - chroma(color) - .brighten(i * 0.4) - .hex() - ); + ? colors.push(chroma(color).darken(i * 0.4).hex()) + : colors.push(chroma(color).brighten(i * 0.4).hex()); } } From 405b3233b32d470310fdc7fcf6a3a7a2b964409a Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 26 Jul 2022 09:14:54 +0000 Subject: [PATCH 3/6] Restyled by prettier --- src/methods/helpers/scaleHelper.js | 61 +++++++++++++++++++----------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/src/methods/helpers/scaleHelper.js b/src/methods/helpers/scaleHelper.js index 4db3c94..21df753 100644 --- a/src/methods/helpers/scaleHelper.js +++ b/src/methods/helpers/scaleHelper.js @@ -3,7 +3,7 @@ import ColorScheme from "color-scheme"; import * as settings from "../config/colorGroups.js"; -import {updateMultiple} from "./storageHelper.js"; +import { updateMultiple } from "./storageHelper.js"; // ----------- ASSIGNABLES ----------- export let orange = [ @@ -167,11 +167,14 @@ export function updateCalendar(color, saturate, scale) { } for (let i = 0; i < scale.length; i++) { - updateMultiple(scale[i], chroma(color) - .brighten(3) - .saturate(saturate) - .alpha((i + 1) * 0.2) - .hex()); + updateMultiple( + scale[i], + chroma(color) + .brighten(3) + .saturate(saturate) + .alpha((i + 1) * 0.2) + .hex() + ); } } @@ -194,16 +197,22 @@ export function updateSpecific(color, desaturate, saturate, scale) { for (let i = 0; i < scale.length; i++) { /^\d/.test(color.slice(-4)) - ? updateMultiple(scale[i], chroma(color) - .brighten(i * 0.4) - .saturate(saturate) - .desaturate(desaturate) - .hex()) - : updateMultiple(scale[i], chroma(color) - .darken(i * 0.4) - .saturate(saturate) - .desaturate(desaturate) - .hex()); + ? updateMultiple( + scale[i], + chroma(color) + .brighten(i * 0.4) + .saturate(saturate) + .desaturate(desaturate) + .hex() + ) + : updateMultiple( + scale[i], + chroma(color) + .darken(i * 0.4) + .saturate(saturate) + .desaturate(desaturate) + .hex() + ); } } @@ -217,10 +226,10 @@ export function updateAccent(color) { export function generateScheme(color, scheme, variation, distance) { let s = new ColorScheme(); s.from_hex(chroma(color).hex().slice(-6)) - .scheme(scheme) - .variation(variation) - .add_complement(true) - .distance(distance); + .scheme(scheme) + .variation(variation) + .add_complement(true) + .distance(distance); return s.colors(); } @@ -229,7 +238,15 @@ export function generateSaturation(color, setting) { let colors = []; for (let i = 0; i < 10; i++) { /^\d/.test(color.slice(-4)) - ? colors.push(chroma(color).darken(i * 0.4).hex()) - : colors.push(chroma(color).brighten(i * 0.4).hex()); + ? colors.push( + chroma(color) + .darken(i * 0.4) + .hex() + ) + : colors.push( + chroma(color) + .brighten(i * 0.4) + .hex() + ); } } From 593ce4d5f5e67bdc13eadbf104bc6e07bd48ef35 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 26 Jul 2022 09:14:56 +0000 Subject: [PATCH 4/6] Restyled by whitespace --- src/assets/images/pint.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/images/pint.svg b/src/assets/images/pint.svg index 9bfba44..18ff3d7 100644 --- a/src/assets/images/pint.svg +++ b/src/assets/images/pint.svg @@ -22,4 +22,4 @@ - \ No newline at end of file + From 61c6922638c2c7a4870d552cca1b324a377d44d4 Mon Sep 17 00:00:00 2001 From: Jariel Que Date: Tue, 26 Jul 2022 17:34:18 +0800 Subject: [PATCH 5/6] docs: make readme look good --- docs/README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/README.md b/docs/README.md index 34db678..9010e64 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,7 +8,7 @@
-###### Traveller Information: You are on the main dev't branch. Things break here. For latest stable check branch v1. +> 💡 You are currently looking at the rebranded version of pint which is currently unreleased, the released one is located [here](https://github.com/fuwaa/pint/tree/v1) [pint](https://projects.fuwa.sh/pint/) is a theming engine that allows you to rice your github experience. @@ -21,8 +21,7 @@ you can install this extension via the chrome web store (old version) or manually. ### chrome web store installation - -please note that the version in the chrome web store is V1, which is very bad and outdated. +> ⚠️ Please note that the version in the chrome web store is V1, which is very bad and outdated. @@ -37,7 +36,15 @@ please note that the version in the chrome web store is V1, which is very bad an ## roadmap -please check #12. +please check issue [#12](https://github.com/fuwaa/pint/issues/12) for more information :) + +## limitations +> 💡 I am still looking for ways to better implement this! if you have any idea, please open an issue or create a pull request [here](https://github.com/fuwaa/pint/issues/new/choose) + +The old implementation used a `setTimeout()` function, however the delay makes the project look like garbage as you can see the original colors before seeing your palette applied. The new implementation simply throws the entire css of github and unsets it while hiding the entire html making github look like an empty page until your palette gets loaded. Slight issue though, a flicker comes from time to time but it isn't noticable. + +## documentation +Documentation is planned to debut on [fuwadocs](https://docs.fuwa.sh/pint/), however it is still in progress and is quite low on the priority queue. ## contributing From 8a523ef35f9b55f6e31de58089f8b1d63e556125 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 09:34:27 +0000 Subject: [PATCH 6/6] Format code with prettier This commit fixes the style issues introduced in 61c6922 according to the output from prettier. Details: https://deepsource.io/gh/fuwaa/pint/transform/41f1820b-f95f-4d01-b6b3-7d2b647739c5/ --- docs/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/README.md b/docs/README.md index 9010e64..73666fc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,6 +21,7 @@ you can install this extension via the chrome web store (old version) or manually. ### chrome web store installation + > ⚠️ Please note that the version in the chrome web store is V1, which is very bad and outdated. @@ -39,11 +40,13 @@ you can install this extension via the chrome web store (old version) or manuall please check issue [#12](https://github.com/fuwaa/pint/issues/12) for more information :) ## limitations + > 💡 I am still looking for ways to better implement this! if you have any idea, please open an issue or create a pull request [here](https://github.com/fuwaa/pint/issues/new/choose) The old implementation used a `setTimeout()` function, however the delay makes the project look like garbage as you can see the original colors before seeing your palette applied. The new implementation simply throws the entire css of github and unsets it while hiding the entire html making github look like an empty page until your palette gets loaded. Slight issue though, a flicker comes from time to time but it isn't noticable. ## documentation + Documentation is planned to debut on [fuwadocs](https://docs.fuwa.sh/pint/), however it is still in progress and is quite low on the priority queue. ## contributing