feat: added palettes generator script, some rust samples and wcag-compliace tests
parent
86248b77f1
commit
4285b456a5
@ -0,0 +1 @@
|
|||||||
|
node_modules/
|
@ -0,0 +1,263 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# ---- sys
|
||||||
|
NC=" \033[0m"
|
||||||
|
coerce=false
|
||||||
|
lowercase=false
|
||||||
|
file=""
|
||||||
|
prefix=""
|
||||||
|
original_palette="storm"
|
||||||
|
verbosity=0
|
||||||
|
|
||||||
|
script_help=$(
|
||||||
|
cat <<EOF
|
||||||
|
Generate missing Catppuccin palettes from a base file (e.g. generate a dawn.conf & a dusk.conf from a storm.conf file)
|
||||||
|
|
||||||
|
Usages:
|
||||||
|
#0: $(basename "$0") <flag> [arg]
|
||||||
|
|
||||||
|
Flags:
|
||||||
|
-f, --file specify file (mandatory)
|
||||||
|
-v, --verbose increase verbosity by 1
|
||||||
|
-o, --original-palette the palette used in the based file (given by --file)
|
||||||
|
-l, --lowercase replaces with lowercased hex codes
|
||||||
|
-c, --coerce force the creation of new palette files (useful when those files already exist)
|
||||||
|
-p, --prefix specify which prefix to use for the hex codes. Surround it with double quotes if needed.
|
||||||
|
-h, --help see this message
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
palette_names=(
|
||||||
|
storm
|
||||||
|
dusk
|
||||||
|
dawn
|
||||||
|
)
|
||||||
|
|
||||||
|
declare -A dusk=(
|
||||||
|
[white]='C6D0F5'
|
||||||
|
[peach]='FAB387'
|
||||||
|
[gray2]='ADB5D8'
|
||||||
|
[black0]='101019'
|
||||||
|
[black1]='181825'
|
||||||
|
[gray1]='959BBA'
|
||||||
|
[blue]='90C1FB'
|
||||||
|
[green]='A6E3A1'
|
||||||
|
[sapphire]='74C7EC'
|
||||||
|
[black3]='323044'
|
||||||
|
[black4]='4B4B62'
|
||||||
|
[black5]='63657F'
|
||||||
|
[teal]='94E2D5'
|
||||||
|
[gray0]='7C809D'
|
||||||
|
[rosewater]='F5E0DC'
|
||||||
|
[maroon]='EBA0AC'
|
||||||
|
[lavender]='C9CBFF'
|
||||||
|
[yellow]='F9E2AF'
|
||||||
|
[flamingo]='F2CDCD'
|
||||||
|
[sky]='89DCEB'
|
||||||
|
[mauve]='CBA6F7'
|
||||||
|
[black2]='1E1E2E'
|
||||||
|
[pink]='F5C2E7'
|
||||||
|
[red]='F38BA8'
|
||||||
|
)
|
||||||
|
|
||||||
|
declare -A storm=(
|
||||||
|
[white]='C5CFF5'
|
||||||
|
[sapphire]='34C3DC'
|
||||||
|
[pink]='F5BFE7'
|
||||||
|
[rosewater]='F5DFDA'
|
||||||
|
[black2]='24273A'
|
||||||
|
[flamingo]='F2CBCB'
|
||||||
|
[red]='F67E98'
|
||||||
|
[maroon]='F1949B'
|
||||||
|
[peach]='FEA571'
|
||||||
|
[black1]='1F2233'
|
||||||
|
[sky]='89DCFD'
|
||||||
|
[gray1]='8289AA'
|
||||||
|
[lavender]='C2CBFE'
|
||||||
|
[black3]='2B3045'
|
||||||
|
[green]='A1DF8E'
|
||||||
|
[black4]='3E435E'
|
||||||
|
[yellow]='F1D8A4'
|
||||||
|
[gray2]='A6AFD2'
|
||||||
|
[blue]='83ABF9'
|
||||||
|
[black0]='1A1B26'
|
||||||
|
[gray0]='5F6587'
|
||||||
|
[teal]='85E0D1'
|
||||||
|
[black5]='4F5473'
|
||||||
|
[mauve]='C59FF6'
|
||||||
|
)
|
||||||
|
|
||||||
|
declare -A dawn=(
|
||||||
|
[black4]='CCC9D1'
|
||||||
|
[peach]='FE6811'
|
||||||
|
[black3]='E6E3E5'
|
||||||
|
[pink]='EC83D0'
|
||||||
|
[black0]='D3D0D2'
|
||||||
|
[black1]='EDEDED'
|
||||||
|
[blue]='1D65F5'
|
||||||
|
[lavender]='7287FD'
|
||||||
|
[mauve]='8F46EF'
|
||||||
|
[black5]='B5B1BF'
|
||||||
|
[maroon]='E63B4A'
|
||||||
|
[rosewater]='E5AC9F'
|
||||||
|
[green]='509E31'
|
||||||
|
[gray1]='86819C'
|
||||||
|
[black2]='FBF8F4'
|
||||||
|
[white]='575279'
|
||||||
|
[gray2]='6E6A8B'
|
||||||
|
[sky]='04A5E5'
|
||||||
|
[sapphire]='209FB5'
|
||||||
|
[red]='D20F39'
|
||||||
|
[teal]='289886'
|
||||||
|
[gray0]='9D99AE'
|
||||||
|
[flamingo]='DF7F7F'
|
||||||
|
[yellow]='E49320'
|
||||||
|
)
|
||||||
|
|
||||||
|
function prompt() {
|
||||||
|
local type=${1} # error, success, warning, info
|
||||||
|
local message=${2}
|
||||||
|
local modifiers=${3}
|
||||||
|
|
||||||
|
if [[ $1 == "-i" || $1 == "--info" ]]; then
|
||||||
|
type=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
case ${type} in
|
||||||
|
"-e" | "--error")
|
||||||
|
printf "\033[0;31m${modifiers}ERROR: %s${NC}\n" "${message}"
|
||||||
|
;;
|
||||||
|
"-s" | "--success")
|
||||||
|
printf "\033[0;32m${modifiers}SUCCESS: %s${NC}\n" "${message}"
|
||||||
|
;;
|
||||||
|
"-w" | "--warning")
|
||||||
|
printf "\033[0;33m${modifiers}WARNING: %s${NC}\n" "${message}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf "\033[0;34m${modifiers}INFO: %s${NC}\n" "${message}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function verbose_print() {
|
||||||
|
# $1 = message
|
||||||
|
# $2 = modifiers
|
||||||
|
if [[ $verbosity -gt 0 ]]; then
|
||||||
|
printf "\033[3;29m${2}%s${NC}\n" "${1}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function generate_palettes() {
|
||||||
|
capitalization_char='\U' # uppercase
|
||||||
|
[[ $lowercase == true ]] && {
|
||||||
|
capitalization_char='\L' # lowercase
|
||||||
|
}
|
||||||
|
|
||||||
|
new_array=()
|
||||||
|
for val in "${palette_names[@]}"; do
|
||||||
|
[[ "$val" != "$original_palette" ]] && new_array+=("$val")
|
||||||
|
done
|
||||||
|
palette_names=("${new_array[@]}")
|
||||||
|
unset new_array
|
||||||
|
|
||||||
|
for palette in "${palette_names[@]}"; do
|
||||||
|
printf " GENERATING: \033[3;32m%s${NC}\n" "$palette"
|
||||||
|
|
||||||
|
local dest_file="${palette}.${file##*.}"
|
||||||
|
prompt -w "creating $dest_file..." "\t• "
|
||||||
|
|
||||||
|
if [[ -f $dest_file ]]; then
|
||||||
|
if [[ ! $coerce == true ]]; then
|
||||||
|
prompt -e "file '$dest_file' already exists. Use --coerce to force it's replacement" "\t• "
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp "$file" "$dest_file"
|
||||||
|
prompt -i "replacing colors..." "\t• "
|
||||||
|
|
||||||
|
for clr in "${!storm[@]}"; do
|
||||||
|
local curr_color=$(eval "echo \${${original_palette}[$clr]}")
|
||||||
|
local dest_color=$(eval "echo \${${palette}[${clr}]}")
|
||||||
|
verbose_print "modifying ${clr}" "\t + "
|
||||||
|
sed -i "s/${curr_color}/${prefix}${capitalization_char}${dest_color}/gI" "$dest_file"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_original_palette() {
|
||||||
|
prompt -w "detecting palette..."
|
||||||
|
original_palette=""
|
||||||
|
for palette in "${palette_names[@]}"; do
|
||||||
|
for clr in "${!storm[@]}"; do
|
||||||
|
if grep -q $(eval "echo \${${palette}[${clr}]}") "$file"; then
|
||||||
|
original_palette=$palette
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $original_palette == "" ]]; then
|
||||||
|
prompt -e "couldn't detect the original palette"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
prompt -s "detected '$original_palette'"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
if [[ ! "$#" -gt 0 ]]; then
|
||||||
|
prompt -e "you must provide at least the file you want to generate the missing palettes from"
|
||||||
|
else
|
||||||
|
local help_used=false
|
||||||
|
while [ "$1" != "" ]; do
|
||||||
|
case $1 in
|
||||||
|
-v | --verbose)
|
||||||
|
verbosity=$((verbosity + 1))
|
||||||
|
;;
|
||||||
|
-f | --file)
|
||||||
|
file=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-o | --original-palette)
|
||||||
|
origianl_palette=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l | --lowercase)
|
||||||
|
lowercase=true
|
||||||
|
;;
|
||||||
|
-c | --coerce)
|
||||||
|
coerce=true
|
||||||
|
;;
|
||||||
|
-p | --prefix)
|
||||||
|
prefix=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-h | --help)
|
||||||
|
help_used=true
|
||||||
|
echo "$script_help"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ERROR: command ($1) not recognized"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $help_used != "true" ]]; then
|
||||||
|
if [[ $file != "" ]]; then
|
||||||
|
[[ -f $file ]] && {
|
||||||
|
prompt "updating colors..."
|
||||||
|
if [[ original_palette != "storm" || original_palette != "dusk" || original_palette != "dawn" ]]; then
|
||||||
|
detect_original_palette
|
||||||
|
fi
|
||||||
|
generate_palettes
|
||||||
|
} || prompt -e "file ${1} does not exist"
|
||||||
|
else
|
||||||
|
prompt -e "please profive a file to use a base using the --file flag"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
@ -0,0 +1,131 @@
|
|||||||
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
|
/* appearance */
|
||||||
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
|
static const char *fonts[] = { "monospace:size=10" };
|
||||||
|
static const char dmenufont[] = "monospace:size=10";
|
||||||
|
static const char col_gray1[] = "#5F6587";
|
||||||
|
static const char col_gray2[] = "#8289AA";
|
||||||
|
static const char col_gray3[] = "#A6AFD2";
|
||||||
|
static const char col_gray4[] = "#C5CFF5";
|
||||||
|
static const char col_teal[] = "#78DCCC";
|
||||||
|
static const char *colors[][3] = {
|
||||||
|
/* fg bg border */
|
||||||
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
|
[SchemeSel] = { col_gray4, col_teal, col_teal },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* tagging */
|
||||||
|
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||||
|
|
||||||
|
static const Rule rules[] = {
|
||||||
|
/* xprop(1):
|
||||||
|
* WM_CLASS(STRING) = instance, class
|
||||||
|
* WM_NAME(STRING) = title
|
||||||
|
*/
|
||||||
|
/* class instance title tags mask isfloating monitor */
|
||||||
|
{ "Gimp", NULL, NULL, 0, 1, -1 },
|
||||||
|
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
|
||||||
|
};
|
||||||
|
static const int ruleperiod = 5; /* number of seconds before rules are ignored */
|
||||||
|
|
||||||
|
/* layout(s) */
|
||||||
|
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
|
||||||
|
static const int nmaster = 1; /* number of clients in master area */
|
||||||
|
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
|
||||||
|
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||||
|
|
||||||
|
static const LayoutMonitorRule lm_rules[] = {
|
||||||
|
/* >=w, >=h, req'd layout, new nmaster, new mfact */
|
||||||
|
{ 3000, 0, 0, 2, 0.66 },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Layout layouts[] = {
|
||||||
|
/* symbol arrange function */
|
||||||
|
{ "[]=", tile }, /* first entry is default */
|
||||||
|
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||||
|
{ "[M]", monocle },
|
||||||
|
{ "TTT", bstack },
|
||||||
|
{ "===", bstackhoriz },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* key definitions */
|
||||||
|
#define MODKEY Mod1Mask
|
||||||
|
#define TAGKEYS(KEY,TAG) \
|
||||||
|
{ KeyPress, MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
|
{ KeyPress, MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||||
|
{ KeyPress, MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||||
|
{ KeyPress, MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||||
|
|
||||||
|
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||||
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
|
||||||
|
/* commands */
|
||||||
|
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||||
|
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_teal, "-sf", col_gray4, NULL };
|
||||||
|
static const char *termcmd[] = { "st", NULL };
|
||||||
|
|
||||||
|
#include "movestack.c"
|
||||||
|
static Key keys[] = {
|
||||||
|
/* modifier key function argument */
|
||||||
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
|
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
|
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
|
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_Return, zoom, {0} },
|
||||||
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
|
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||||
|
{ MODKEY|ShiftMask, XK_x, killunsel, {0} },
|
||||||
|
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||||
|
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||||
|
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||||
|
{ MODKEY, XK_u, setlayout, {.v = &layouts[3]} },
|
||||||
|
{ MODKEY, XK_o, setlayout, {.v = &layouts[4]} },
|
||||||
|
{ MODKEY, XK_space, setlayout, {0} },
|
||||||
|
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
|
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||||
|
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
|
{ MODKEY|ControlMask, XK_comma, tagallmon, {.i = -1 } },
|
||||||
|
{ MODKEY|ControlMask, XK_period, tagallmon, {.i = +1 } },
|
||||||
|
TAGKEYS( XK_1, 0)
|
||||||
|
TAGKEYS( XK_2, 1)
|
||||||
|
TAGKEYS( XK_3, 2)
|
||||||
|
TAGKEYS( XK_4, 3)
|
||||||
|
TAGKEYS( XK_5, 4)
|
||||||
|
TAGKEYS( XK_6, 5)
|
||||||
|
TAGKEYS( XK_7, 6)
|
||||||
|
TAGKEYS( XK_8, 7)
|
||||||
|
TAGKEYS( XK_9, 8)
|
||||||
|
{ KeyPress, MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* button definitions */
|
||||||
|
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||||
|
static Button buttons[] = {
|
||||||
|
/* click event mask button function argument */
|
||||||
|
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||||
|
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||||
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||||
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
||||||
|
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||||
|
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
||||||
|
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||||
|
{ ClkTagBar, 0, Button1, view, {0} },
|
||||||
|
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||||
|
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||||
|
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||||
|
};
|
@ -1,5 +1,3 @@
|
|||||||
// Simple program made by a simple programmer
|
|
||||||
|
|
||||||
#![warn(rust_2018_idioms)]
|
#![warn(rust_2018_idioms)]
|
||||||
#![allow(elided_lifetimes_in_paths)]
|
#![allow(elided_lifetimes_in_paths)]
|
||||||
|
|
@ -0,0 +1,326 @@
|
|||||||
|
{
|
||||||
|
"name": "wcag-compliance",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"lockfileVersion": 2,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "wcag-compliance",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"color-contrast-checker": "^2.1.0",
|
||||||
|
"execa": "^6.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/color-contrast-checker": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-contrast-checker/-/color-contrast-checker-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-6Y0aIEej3pwZTVlicIqVzhO6T4izDWouaIXnYoDdTuFFAMQ9nnN0dgHNP9J94jRnH6asjPq1/wzUKxwoNbWtRQ=="
|
||||||
|
},
|
||||||
|
"node_modules/cross-spawn": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||||
|
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||||
|
"dependencies": {
|
||||||
|
"path-key": "^3.1.0",
|
||||||
|
"shebang-command": "^2.0.0",
|
||||||
|
"which": "^2.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/execa": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==",
|
||||||
|
"dependencies": {
|
||||||
|
"cross-spawn": "^7.0.3",
|
||||||
|
"get-stream": "^6.0.1",
|
||||||
|
"human-signals": "^3.0.1",
|
||||||
|
"is-stream": "^3.0.0",
|
||||||
|
"merge-stream": "^2.0.0",
|
||||||
|
"npm-run-path": "^5.1.0",
|
||||||
|
"onetime": "^6.0.0",
|
||||||
|
"signal-exit": "^3.0.7",
|
||||||
|
"strip-final-newline": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sindresorhus/execa?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/get-stream": {
|
||||||
|
"version": "6.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
|
||||||
|
"integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/human-signals": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/is-stream": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/isexe": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||||
|
},
|
||||||
|
"node_modules/merge-stream": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="
|
||||||
|
},
|
||||||
|
"node_modules/mimic-fn": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/npm-run-path": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
|
||||||
|
"dependencies": {
|
||||||
|
"path-key": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/npm-run-path/node_modules/path-key": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/onetime": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"mimic-fn": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/path-key": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/shebang-command": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||||
|
"dependencies": {
|
||||||
|
"shebang-regex": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/shebang-regex": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/signal-exit": {
|
||||||
|
"version": "3.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||||
|
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||||
|
},
|
||||||
|
"node_modules/strip-final-newline": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/which": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||||
|
"dependencies": {
|
||||||
|
"isexe": "^2.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"node-which": "bin/node-which"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"color-contrast-checker": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-contrast-checker/-/color-contrast-checker-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-6Y0aIEej3pwZTVlicIqVzhO6T4izDWouaIXnYoDdTuFFAMQ9nnN0dgHNP9J94jRnH6asjPq1/wzUKxwoNbWtRQ=="
|
||||||
|
},
|
||||||
|
"cross-spawn": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||||
|
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||||
|
"requires": {
|
||||||
|
"path-key": "^3.1.0",
|
||||||
|
"shebang-command": "^2.0.0",
|
||||||
|
"which": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"execa": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==",
|
||||||
|
"requires": {
|
||||||
|
"cross-spawn": "^7.0.3",
|
||||||
|
"get-stream": "^6.0.1",
|
||||||
|
"human-signals": "^3.0.1",
|
||||||
|
"is-stream": "^3.0.0",
|
||||||
|
"merge-stream": "^2.0.0",
|
||||||
|
"npm-run-path": "^5.1.0",
|
||||||
|
"onetime": "^6.0.0",
|
||||||
|
"signal-exit": "^3.0.7",
|
||||||
|
"strip-final-newline": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-stream": {
|
||||||
|
"version": "6.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
|
||||||
|
"integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="
|
||||||
|
},
|
||||||
|
"human-signals": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ=="
|
||||||
|
},
|
||||||
|
"is-stream": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA=="
|
||||||
|
},
|
||||||
|
"isexe": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||||
|
},
|
||||||
|
"merge-stream": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="
|
||||||
|
},
|
||||||
|
"mimic-fn": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw=="
|
||||||
|
},
|
||||||
|
"npm-run-path": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
|
||||||
|
"requires": {
|
||||||
|
"path-key": "^4.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"path-key": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"onetime": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
|
||||||
|
"requires": {
|
||||||
|
"mimic-fn": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-key": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
|
||||||
|
},
|
||||||
|
"shebang-command": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||||
|
"requires": {
|
||||||
|
"shebang-regex": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"shebang-regex": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="
|
||||||
|
},
|
||||||
|
"signal-exit": {
|
||||||
|
"version": "3.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||||
|
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||||
|
},
|
||||||
|
"strip-final-newline": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw=="
|
||||||
|
},
|
||||||
|
"which": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||||
|
"requires": {
|
||||||
|
"isexe": "^2.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"name": "wcag-compliance",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "An accessibility checker tool for validating the color contrast of Catppuccin's palettes based on WCAG 2.0 and WCAG 2.1 standards",
|
||||||
|
"main": "./src/index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/catppuccin/catppuccin.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"wcag",
|
||||||
|
"wcag-aa",
|
||||||
|
"color",
|
||||||
|
"contrast",
|
||||||
|
"verifier",
|
||||||
|
"accessibility",
|
||||||
|
"standard"
|
||||||
|
],
|
||||||
|
"author": "Pocco81",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/catppuccin/catppuccin/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/catppuccin/catppuccin#readme",
|
||||||
|
"dependencies": {
|
||||||
|
"color-contrast-checker": "^2.1.0",
|
||||||
|
"execa": "^6.1.0"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,110 @@
|
|||||||
|
// import { platform } from 'os';
|
||||||
|
|
||||||
|
const os = require('os')
|
||||||
|
const execa = require("execa")
|
||||||
|
const ColorContrastChecker = require('color-contrast-checker')
|
||||||
|
|
||||||
|
const {stdout} = execa('echo', ['unicorns']);
|
||||||
|
console.log(stdout);
|
||||||
|
|
||||||
|
|
||||||
|
function get_git_root() {
|
||||||
|
try {
|
||||||
|
let cmd = ''
|
||||||
|
|
||||||
|
if (platform() === 'win32') {
|
||||||
|
cmd = `git rev-parse --show-toplevel `
|
||||||
|
} else {
|
||||||
|
cmd = `(git rev-parse --show-toplevel )`
|
||||||
|
}
|
||||||
|
|
||||||
|
const { stdout } = execa.shellSync(cmd)
|
||||||
|
|
||||||
|
return stdout
|
||||||
|
} catch (e) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// console.log(execa.shellSync("echo 'hello'"))
|
||||||
|
|
||||||
|
// /* File System Object */
|
||||||
|
// var fs = require('fs');
|
||||||
|
//
|
||||||
|
// pr
|
||||||
|
|
||||||
|
/* Read File */
|
||||||
|
// fs.readFile(get_git_root() + "palettes.json", bar)
|
||||||
|
|
||||||
|
function bar (err, data)
|
||||||
|
{
|
||||||
|
/* If an error exists, show it, otherwise show the file */
|
||||||
|
err ? Function("error","throw error")(err) : console.log(JSON.stringify(data) );
|
||||||
|
};
|
||||||
|
|
||||||
|
// const fs = require("fs")
|
||||||
|
//
|
||||||
|
|
||||||
|
// var ccc = new ColorContrastChecker();
|
||||||
|
// var palettes = fs.readFileSync('../../palettes.json', 'utf8');
|
||||||
|
// var palettes = fs.readFile('test.json', 'utf8');
|
||||||
|
|
||||||
|
// fs.readFile("../../../palettes.json", function(text){
|
||||||
|
// palettes = text.split("\n")
|
||||||
|
// });
|
||||||
|
|
||||||
|
// for (var key in palettes) {
|
||||||
|
// console.log(key)
|
||||||
|
// if (ccc.isLevelAA(background, rainbow[key], 14)) {
|
||||||
|
// console.log(" •" + key + ": ✅");
|
||||||
|
// } else {
|
||||||
|
// console.log(" •" + key + ": ❌");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const background = "#1E1D2F"
|
||||||
|
// var rainbow = {
|
||||||
|
// rosewater: "#F5E0DC",
|
||||||
|
// flamingo: "#F2CDCD",
|
||||||
|
// mauve: "#DDB6F2",
|
||||||
|
// pink: "#F5C2E7",
|
||||||
|
// red: "#F28FAD",
|
||||||
|
// maroon: "#E8A2AF",
|
||||||
|
// peach: "#F8BD96",
|
||||||
|
// yellow: "#FAE3B0",
|
||||||
|
// green: "#ABE9B3",
|
||||||
|
// blue: "#96CDFB",
|
||||||
|
// sky: "#89DCEB",
|
||||||
|
// teal: "#B5E8E0",
|
||||||
|
// lavender: "#C9CBFF",
|
||||||
|
// white: "#D9E0EE",
|
||||||
|
// gray2: "#C3BAC6",
|
||||||
|
// gray1: "#988BA2",
|
||||||
|
// gray0: "#6E6C7E",
|
||||||
|
// black4: "#575268",
|
||||||
|
// black3: "#302D41",
|
||||||
|
// black2: "#1E1D2F",
|
||||||
|
// black1: "#1A1823",
|
||||||
|
// black0: "#131020",
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// console.log("\t---- WCAG conformance level AA on Catppuccin ----\n")
|
||||||
|
//
|
||||||
|
// for (var key in rainbow) {
|
||||||
|
// if (ccc.isLevelAA(background, rainbow[key], 14)) {
|
||||||
|
// console.log(" •" + key + ": ✅");
|
||||||
|
// } else {
|
||||||
|
// console.log(" •" + key + ": ❌");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// var color1 = "#FFFFFF";
|
||||||
|
// var color2 = "#000000";
|
||||||
|
//
|
||||||
|
// if (ccc.isLevelAA(color1, color2, 14)) {
|
||||||
|
// console.log("Valid Level AA");
|
||||||
|
// } else {
|
||||||
|
// console.log("Invalid Contrast");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// console.log("Hello world!")
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"hello": "world"
|
||||||
|
}
|
Loading…
Reference in New Issue