diff --git a/README.md b/README.md index ac0f77a..cdf6242 100644 --- a/README.md +++ b/README.md @@ -51,39 +51,121 @@ To make the best use them please refer to the [Styleguide](https://github.com/catppuccin/style-guide).
-#### Morning - -| | Name | Hex | RGB | HSL | CMYK | -| ----------------------------------------------------------------------- | -------- | --------- | --------------- | --------------- | ------------------ | -| | Flamingo | `#F2CDCD` | `242, 205, 205` | `0, 59%, 88%` | `0%, 15%, 15%, 5%` | -| | Mauve | `#DDB6F2` | `221, 182, 242` | `279, 70%, 83%` | `9%, 25%, 0%, 5%` | -| | Pink | `#F5C2E7` | `245, 194, 231` | `316, 72%, 86%` | `0%, 21%, 6%, 4%` | -| | Maroon | `#E8A2AF` | `232, 162, 175` | `349, 60%, 77%` | `0%, 30%, 25%, 9%` | -| | Red | `#F28FAD` | `242, 143, 173` | `342, 79%, 75%` | `0%, 41%, 29%, 5%` | -| | Peach | `#F8BD96` | `248, 189, 150` | `24, 88%, 78%` | `0%, 24%, 40%, 3%` | -| | Yellow | `#FAE3B0` | `250, 227, 176` | `41, 88%, 84%` | `0%, 9%, 30%, 2%` | -| | Green | `#ABE9B3` | `171, 233, 179` | `128, 58%, 79%` | `27%, 0%, 23%, 9%` | -| | Teal | `#B5E8E0` | `181, 232, 224` | `171, 53%, 81%` | `22%, 0%, 3%, 9%` | -| | Blue | `#96CDFB` | `150, 205, 251` | `207, 93%, 79%` | `40%, 18%, 0%, 2%` | -| | Sky | `#89DCEB` | `137, 220, 235` | `189, 71%, 73%` | `42%, 6%, 0%, 8%` | - - - -#### Night - -| | Name | Hex | RGB | HSL | CMYK | -| ------------------------------------------------------------------------ | --------- | --------- | --------------- | ---------------- | ------------------- | -| | Black 0 | `#161320` | `22, 19, 32` | `254, 25%, 10%` | `31%, 41%, 0%, 87%` | -| | Black 1 | `#1A1826` | `26, 24, 38` | `249, 23%, 12%` | `32%, 37%, 0%, 85%` | -| | Black 2 | `#1E1E2E` | `30, 30, 46` | `240, 21%, 15%%` | `35%, 35%, 0%, 82%` | -| | Black 3 | `#302D41` | `48, 45, 65` | `249, 18%, 22%` | `26%, 31%, 0%, 75%` | -| | Black 4 | `#575268` | `87, 82, 104` | `254, 12%, 36%` | `16%, 21%, 0%, 59%` | -| | Gray 0 | `#6E6C7E` | `110, 108, 126` | `247, 8%, 46%` | `13%, 14%, 0%, 51%` | -| | Gray 1 | `#988BA2` | `152, 139, 162` | `274, 11%, 59%` | `6%, 14%, 0%, 36%` | -| | Gray 2 | `#C3BAC6` | `195, 186, 198` | `285, 10%, 75%` | `2%, 6%, 0%, 22%` | -| | White | `#D9E0EE` | `217, 224, 238` | `220, 38%, 89%` | `9%, 6%, 0%, 7%` | -| | Lavender | `#C9CBFF` | `201, 203, 255` | `238, 100%, 89%` | `21%, 20%, 0%, 0%` | -| | Rosewater | `#F5E0DC` | `245, 224, 220` | `10, 56%, 91%` | `0%, 9%, 10%, 4%` | +| | Labels | Hex | RGB | HSL | +| ------------------------------------------------------------------------------ | --------- | --------- | -------------------- | -------------------- | +| | Rosewater | `#dc8a78` | `rgb(220, 138, 120)` | `hsl(11, 59%, 67%)` | +| | Flamingo | `#dd7878` | `rgb(221, 120, 120)` | `hsl(0, 60%, 67%)` | +| | Pink | `#ea76cb` | `rgb(234, 118, 203)` | `hsl(316, 73%, 69%)` | +| | Mauve | `#8839ef` | `rgb(136, 57, 239)` | `hsl(266, 85%, 58%)` | +| | Red | `#d20f39` | `rgb(210, 15, 57)` | `hsl(347, 87%, 44%)` | +| | Maroon | `#e64553` | `rgb(230, 69, 83)` | `hsl(355, 76%, 59%)` | +| | Peach | `#fe640b` | `rgb(254, 100, 11)` | ` hsl(22, 99%, 52%)` | +| | Yellow | `#df8e1d` | `rgb(223, 142, 29)` | `hsl(35, 77%, 49%)` | +| | Green | `#40a02b` | `rgb(64, 160, 43)` | `hsl(109, 58%, 40%)` | +| | Teal | `#179299` | `rgb(23, 146, 153)` | `hsl(183, 74%, 35%)` | +| | Sky | `#04a5e5` | `rgb(4, 165, 229)` | `hsl(197, 97%, 46%)` | +| | Sapphire | `#209fb5` | `rgb(32, 159, 181)` | `hsl(189, 70%, 42%)` | +| | Blue | `#1e66f5` | `rgb(30, 102, 245)` | `hsl(220, 91%, 54%)` | +| | Lavender | `#7287fd` | `rgb(114, 135, 253)` | `hsl(231, 97%, 72%)` | +| | Text | `#4c4f69` | `rgb(76, 79, 105)` | `hsl(234, 16%, 35%)` | +| | Subtext1 | `#5c5f77` | `rgb(92, 95, 119)` | `hsl(233, 13%, 41%)` | +| | Subtext0 | `#6c6f85` | `rgb(108, 111, 133)` | `hsl(233, 10%, 47%)` | +| | Overlay2 | `#7c7f93` | `rgb(124, 127, 147)` | `hsl(232, 10%, 53%)` | +| | Overlay1 | `#8c8fa1` | `rgb(140, 143, 161)` | `hsl(231, 10%, 59%)` | +| | Overlay0 | `#9ca0b0` | `rgb(156, 160, 176)` | `hsl(228, 11%, 65%)` | +| | Surface2 | `#acb0be` | `rgb(172, 176, 190)` | `hsl(227, 12%, 71%)` | +| | Surface1 | `#bcc0cc` | `rgb(188, 192, 204)` | `hsl(225, 14%, 77%)` | +| | Surface0 | `#ccd0da` | `rgb(204, 208, 218)` | `hsl(223, 16%, 83%)` | +| | Base | `#eff1f5` | `rgb(239, 241, 245)` | `hsl(220, 23%, 95%)` | +| | Mantle | `#e6e9ef` | `rgb(230, 233, 239)` | `hsl(220, 22%, 92%)` | +| | Crust | `#dce0e8` | `rgb(220, 224, 232)` | `hsl(220, 21%, 89%)` | + +| | Labels | Hex | RGB | HSL | +| ------------------------------------------------------------------------------- | --------- | --------- | -------------------- | -------------------- | +| | Rosewater | `#f2d5cf` | `rgb(242, 213, 207)` | `hsl(10, 57%, 88%)` | +| | Flamingo | `#eebebe` | `rgb(238, 190, 190)` | `hsl(0, 59%, 84%)` | +| | Pink | `#f4b8e4` | `rgb(244, 184, 228)` | `hsl(316, 73%, 84%)` | +| | Mauve | `#ca9ee6` | `rgb(202, 158, 230)` | `hsl(277, 59%, 76%)` | +| | Red | `#e78284` | `rgb(231, 130, 132)` | `hsl(359, 68%, 71%)` | +| | Maroon | `#ea999c` | `rgb(234, 153, 156)` | `hsl(358, 66%, 76%)` | +| | Peach | `#ef9f76` | `rgb(239, 159, 118)` | `hsl(20, 79%, 70%)` | +| | Yellow | `#e5c890` | `rgb(229, 200, 144)` | `hsl(40, 62%, 73%)` | +| | Green | `#a6d189` | `rgb(166, 209, 137)` | `hsl(96, 44%, 68%)` | +| | Teal | `#81c8be` | `rgb(129, 200, 190)` | `hsl(172, 39%, 65%)` | +| | Sky | `#99d1db` | `rgb(153, 209, 219)` | `hsl(189, 48%, 73%)` | +| | Sapphire | `#85c1dc` | `rgb(133, 193, 220)` | `hsl(199, 55%, 69%)` | +| | Blue | `#8caaee` | `rgb(140, 170, 238)` | `hsl(222, 74%, 74%)` | +| | Lavender | `#babbf1` | `rgb(186, 187, 241)` | `hsl(239, 66%, 84%)` | +| | Text | `#c6ceef` | `rgb(198, 206, 239)` | `hsl(228, 56%, 86%)` | +| | Subtext1 | `#b5bddc` | `rgb(181, 189, 220)` | `hsl(228, 36%, 79%)` | +| | Subtext0 | `#a5acc9` | `rgb(165, 172, 201)` | `hsl(228, 25%, 72%)` | +| | Overlay2 | `#949bb7` | `rgb(148, 155, 183)` | `hsl(228, 20%, 65%)` | +| | Overlay1 | `#838aa4` | `rgb(131, 138, 164)` | `hsl(227, 15%, 58%)` | +| | Overlay0 | `#737891` | `rgb(115, 120, 145)` | `hsl(230, 12%, 51%)` | +| | Surface2 | `#62677e` | `rgb(98, 103, 126)` | `hsl(229, 13%, 44%)` | +| | Surface1 | `#51566c` | `rgb(81, 86, 108)` | `hsl(229, 14%, 37%)` | +| | Surface0 | `#414559` | `rgb(65, 69, 89)` | `hsl(230, 16%, 30%)` | +| | Base | `#303446` | `rgb(48, 52, 70)` | `hsl(229, 19%, 23%)` | +| | Mantle | `#292c3c` | `rgb(41, 44, 60)` | `hsl(231, 19%, 20%)` | +| | Crust | `#232634` | `rgb(35, 38, 52)` | `hsl(229, 20%, 17%)` | + +| | Labels | Hex | RGB | HSL | +| ---------------------------------------------------------------------------------- | --------- | --------- | -------------------- | -------------------- | +| | Rosewater | `#f4dbd6` | `rgb(244, 219, 214)` | `hsl(10, 58%, 90%)` | +| | Flamingo | `#f0c6c6` | `rgb(240, 198, 198)` | `hsl(0, 58%, 86%)` | +| | Pink | `#f5bde6` | `rgb(245, 189, 230)` | `hsl(316, 74%, 85%)` | +| | Mauve | `#c6a0f6` | `rgb(198, 160, 246)` | `hsl(267, 83%, 80%)` | +| | Red | `#ed8796` | `rgb(237, 135, 150)` | `hsl(351, 74%, 73%)` | +| | Maroon | `#ee99a0` | `rgb(238, 153, 160)` | `hsl(355, 71%, 77%)` | +| | Peach | `#f5a97f` | `rgb(245, 169, 127)` | `hsl(21, 86%, 73%)` | +| | Yellow | `#eed49f` | `rgb(238, 212, 159)` | `hsl(40, 70%, 78%)` | +| | Green | `#a6da95` | `rgb(166, 218, 149)` | `hsl(105, 48%, 72%)` | +| | Teal | `#8bd5ca` | `rgb(139, 213, 202)` | `hsl(171, 47%, 69%)` | +| | Sky | `#91d7e3` | `rgb(145, 215, 227)` | `hsl(189, 59%, 73%)` | +| | Sapphire | `#7dc4e4` | `rgb(125, 196, 228)` | `hsl(199, 66%, 69%)` | +| | Blue | `#8aadf4` | `rgb(138, 173, 244)` | `hsl(220, 83%, 75%)` | +| | Lavender | `#b7bdf8` | `rgb(183, 189, 248)` | `hsl(234, 82%, 85%)` | +| | Text | `#c5cff5` | `rgb(197, 207, 245)` | `hsl(228, 71%, 87%)` | +| | Subtext1 | `#b3bce0` | `rgb(179, 188, 224)` | `hsl(228, 42%, 79%)` | +| | Subtext0 | `#a1aacb` | `rgb(161, 170, 203)` | `hsl(227, 29%, 71%)` | +| | Overlay2 | `#8f97b7` | `rgb(143, 151, 183)` | `hsl(228, 22%, 64%)` | +| | Overlay1 | `#7d84a2` | `rgb(125, 132, 162)` | `hsl(229, 17%, 56%)` | +| | Overlay0 | `#6c728d` | `rgb(108, 114, 141)` | `hsl(229, 13%, 49%)` | +| | Surface2 | `#5a5f78` | `rgb(90, 95, 120)` | `hsl(230, 14%, 41%)` | +| | Surface1 | `#484c64` | `rgb(72, 76, 100)` | `hsl(231, 16%, 34%)` | +| | Surface0 | `#363a4f` | `rgb(54, 58, 79)` | `hsl(230, 19%, 26%)` | +| | Base | `#24273a` | `rgb(36, 39, 58)` | `hsl(232, 23%, 18%)` | +| | Mantle | `#1e2030` | `rgb(30, 32, 48)` | `hsl(233, 23%, 15%)` | +| | Crust | `#181926` | `rgb(24, 25, 38)` | `hsl(236, 23%, 12%)` | + +| | Labels | Hex | RGB | HSL | +| ------------------------------------------------------------------------------ | --------- | --------- | -------------------- | -------------------- | +| | Rosewater | `#f5e0dc` | `rgb(245, 224, 220)` | `hsl(10, 56%, 91%)` | +| | Flamingo | `#f2cdcd` | `rgb(242, 205, 205)` | `hsl(0, 59%, 88%)` | +| | Pink | `#f5c2e7` | `rgb(245, 194, 231)` | `hsl(316, 72%, 86%)` | +| | Mauve | `#cba6f7` | `rgb(203, 166, 247)` | `hsl(267, 84%, 81%)` | +| | Red | `#f38ba8` | `rgb(243, 139, 168)` | `hsl(343, 81%, 75%)` | +| | Maroon | `#eba0ac` | `rgb(235, 160, 172)` | `hsl(350, 65%, 77%)` | +| | Peach | `#fab387` | `rgb(250, 179, 135)` | `hsl(23, 92%, 75%)` | +| | Yellow | `#f9e2af` | `rgb(249, 226, 175)` | `hsl(41, 86%, 83%)` | +| | Green | `#a6e3a1` | `rgb(166, 227, 161)` | `hsl(115, 54%, 76%)` | +| | Teal | `#94e2d5` | `rgb(148, 226, 213)` | `hsl(170, 57%, 73%)` | +| | Sky | `#89dceb` | `rgb(137, 220, 235)` | `hsl(189, 71%, 73%)` | +| | Sapphire | `#74c7ec` | `rgb(116, 199, 236)` | `hsl(199, 76%, 69%)` | +| | Blue | `#87b0f9` | `rgb(135, 176, 249)` | `hsl(218, 90%, 75%)` | +| | Lavender | `#b4befe` | `rgb(180, 190, 254)` | `hsl(232, 97%, 85%)` | +| | Text | `#c6d0f5` | `rgb(198, 208, 245)` | `hsl(227, 70%, 87%)` | +| | Subtext1 | `#b3bcdf` | `rgb(179, 188, 223)` | `hsl(228, 41%, 79%)` | +| | Subtext0 | `#a1a8c9` | `rgb(161, 168, 201)` | `hsl(229, 27%, 71%)` | +| | Overlay2 | `#8e95b3` | `rgb(142, 149, 179)` | `hsl(229, 20%, 63%)` | +| | Overlay1 | `#7b819d` | `rgb(123, 129, 157)` | `hsl(229, 15%, 55%)` | +| | Overlay0 | `#696d86` | `rgb(105, 109, 134)` | `hsl(232, 12%, 47%)` | +| | Surface2 | `#565970` | `rgb(86, 89, 112)` | `hsl(233, 13%, 39%)` | +| | Surface1 | `#43465a` | `rgb(67, 70, 90)` | `hsl(232, 15%, 31%)` | +| | Surface0 | `#313244` | `rgb(49, 50, 68)` | `hsl(237, 16%, 23%)` | +| | Base | `#1e1e2e` | `rgb(30, 30, 46)` | `hsl(240, 21%, 15%)` | +| | Mantle | `#181825` | `rgb(24, 24, 37)` | `hsl(240, 21%, 12%)` | +| | Crust | `#11111b` | `rgb(17, 17, 27)` | `hsl(240, 23%, 9%)` |   diff --git a/assets/palette/circles/black0.png b/assets/palette/circles/black0.png deleted file mode 100644 index b6dfa4a..0000000 Binary files a/assets/palette/circles/black0.png and /dev/null differ diff --git a/assets/palette/circles/black1.png b/assets/palette/circles/black1.png deleted file mode 100644 index be66d76..0000000 Binary files a/assets/palette/circles/black1.png and /dev/null differ diff --git a/assets/palette/circles/black2.png b/assets/palette/circles/black2.png deleted file mode 100644 index d2d06fb..0000000 Binary files a/assets/palette/circles/black2.png and /dev/null differ diff --git a/assets/palette/circles/black3.png b/assets/palette/circles/black3.png deleted file mode 100644 index 4c34102..0000000 Binary files a/assets/palette/circles/black3.png and /dev/null differ diff --git a/assets/palette/circles/black4.png b/assets/palette/circles/black4.png deleted file mode 100644 index fa253c4..0000000 Binary files a/assets/palette/circles/black4.png and /dev/null differ diff --git a/assets/palette/circles/blue.png b/assets/palette/circles/blue.png deleted file mode 100644 index 768fa78..0000000 Binary files a/assets/palette/circles/blue.png and /dev/null differ diff --git a/assets/palette/circles/flamingo.png b/assets/palette/circles/flamingo.png deleted file mode 100644 index 47068c2..0000000 Binary files a/assets/palette/circles/flamingo.png and /dev/null differ diff --git a/assets/palette/circles/frappe_base.png b/assets/palette/circles/frappe_base.png new file mode 100644 index 0000000..e0e622a Binary files /dev/null and b/assets/palette/circles/frappe_base.png differ diff --git a/assets/palette/circles/frappe_blue.png b/assets/palette/circles/frappe_blue.png new file mode 100644 index 0000000..7779887 Binary files /dev/null and b/assets/palette/circles/frappe_blue.png differ diff --git a/assets/palette/circles/frappe_crust.png b/assets/palette/circles/frappe_crust.png new file mode 100644 index 0000000..10cbce1 Binary files /dev/null and b/assets/palette/circles/frappe_crust.png differ diff --git a/assets/palette/circles/frappe_flamingo.png b/assets/palette/circles/frappe_flamingo.png new file mode 100644 index 0000000..071e9bb Binary files /dev/null and b/assets/palette/circles/frappe_flamingo.png differ diff --git a/assets/palette/circles/frappe_green.png b/assets/palette/circles/frappe_green.png new file mode 100644 index 0000000..48cbc83 Binary files /dev/null and b/assets/palette/circles/frappe_green.png differ diff --git a/assets/palette/circles/frappe_lavender.png b/assets/palette/circles/frappe_lavender.png new file mode 100644 index 0000000..14950c4 Binary files /dev/null and b/assets/palette/circles/frappe_lavender.png differ diff --git a/assets/palette/circles/frappe_mantle.png b/assets/palette/circles/frappe_mantle.png new file mode 100644 index 0000000..ac462cc Binary files /dev/null and b/assets/palette/circles/frappe_mantle.png differ diff --git a/assets/palette/circles/frappe_maroon.png b/assets/palette/circles/frappe_maroon.png new file mode 100644 index 0000000..0c49ff0 Binary files /dev/null and b/assets/palette/circles/frappe_maroon.png differ diff --git a/assets/palette/circles/frappe_mauve.png b/assets/palette/circles/frappe_mauve.png new file mode 100644 index 0000000..01b134d Binary files /dev/null and b/assets/palette/circles/frappe_mauve.png differ diff --git a/assets/palette/circles/frappe_overlay0.png b/assets/palette/circles/frappe_overlay0.png new file mode 100644 index 0000000..3e30100 Binary files /dev/null and b/assets/palette/circles/frappe_overlay0.png differ diff --git a/assets/palette/circles/frappe_overlay1.png b/assets/palette/circles/frappe_overlay1.png new file mode 100644 index 0000000..f8e4372 Binary files /dev/null and b/assets/palette/circles/frappe_overlay1.png differ diff --git a/assets/palette/circles/frappe_overlay2.png b/assets/palette/circles/frappe_overlay2.png new file mode 100644 index 0000000..259a537 Binary files /dev/null and b/assets/palette/circles/frappe_overlay2.png differ diff --git a/assets/palette/circles/frappe_peach.png b/assets/palette/circles/frappe_peach.png new file mode 100644 index 0000000..a3dd453 Binary files /dev/null and b/assets/palette/circles/frappe_peach.png differ diff --git a/assets/palette/circles/frappe_pink.png b/assets/palette/circles/frappe_pink.png new file mode 100644 index 0000000..c973f78 Binary files /dev/null and b/assets/palette/circles/frappe_pink.png differ diff --git a/assets/palette/circles/frappe_red.png b/assets/palette/circles/frappe_red.png new file mode 100644 index 0000000..2a6487b Binary files /dev/null and b/assets/palette/circles/frappe_red.png differ diff --git a/assets/palette/circles/frappe_rosewater.png b/assets/palette/circles/frappe_rosewater.png new file mode 100644 index 0000000..53b9b01 Binary files /dev/null and b/assets/palette/circles/frappe_rosewater.png differ diff --git a/assets/palette/circles/frappe_sapphire.png b/assets/palette/circles/frappe_sapphire.png new file mode 100644 index 0000000..25f4700 Binary files /dev/null and b/assets/palette/circles/frappe_sapphire.png differ diff --git a/assets/palette/circles/frappe_sky.png b/assets/palette/circles/frappe_sky.png new file mode 100644 index 0000000..ecdbe9b Binary files /dev/null and b/assets/palette/circles/frappe_sky.png differ diff --git a/assets/palette/circles/frappe_subtext0.png b/assets/palette/circles/frappe_subtext0.png new file mode 100644 index 0000000..c9c4f29 Binary files /dev/null and b/assets/palette/circles/frappe_subtext0.png differ diff --git a/assets/palette/circles/frappe_subtext1.png b/assets/palette/circles/frappe_subtext1.png new file mode 100644 index 0000000..7386785 Binary files /dev/null and b/assets/palette/circles/frappe_subtext1.png differ diff --git a/assets/palette/circles/frappe_surface0.png b/assets/palette/circles/frappe_surface0.png new file mode 100644 index 0000000..850e081 Binary files /dev/null and b/assets/palette/circles/frappe_surface0.png differ diff --git a/assets/palette/circles/frappe_surface1.png b/assets/palette/circles/frappe_surface1.png new file mode 100644 index 0000000..b272ac9 Binary files /dev/null and b/assets/palette/circles/frappe_surface1.png differ diff --git a/assets/palette/circles/frappe_surface2.png b/assets/palette/circles/frappe_surface2.png new file mode 100644 index 0000000..7f07b06 Binary files /dev/null and b/assets/palette/circles/frappe_surface2.png differ diff --git a/assets/palette/circles/frappe_teal.png b/assets/palette/circles/frappe_teal.png new file mode 100644 index 0000000..6c1e6c8 Binary files /dev/null and b/assets/palette/circles/frappe_teal.png differ diff --git a/assets/palette/circles/frappe_text.png b/assets/palette/circles/frappe_text.png new file mode 100644 index 0000000..02fd23a Binary files /dev/null and b/assets/palette/circles/frappe_text.png differ diff --git a/assets/palette/circles/frappe_yellow.png b/assets/palette/circles/frappe_yellow.png new file mode 100644 index 0000000..6c78760 Binary files /dev/null and b/assets/palette/circles/frappe_yellow.png differ diff --git a/assets/palette/circles/gray0.png b/assets/palette/circles/gray0.png deleted file mode 100644 index 53853a2..0000000 Binary files a/assets/palette/circles/gray0.png and /dev/null differ diff --git a/assets/palette/circles/gray1.png b/assets/palette/circles/gray1.png deleted file mode 100644 index b005adb..0000000 Binary files a/assets/palette/circles/gray1.png and /dev/null differ diff --git a/assets/palette/circles/gray2.png b/assets/palette/circles/gray2.png deleted file mode 100644 index 00691e1..0000000 Binary files a/assets/palette/circles/gray2.png and /dev/null differ diff --git a/assets/palette/circles/green.png b/assets/palette/circles/green.png deleted file mode 100644 index 066f0a8..0000000 Binary files a/assets/palette/circles/green.png and /dev/null differ diff --git a/assets/palette/circles/latte_base.png b/assets/palette/circles/latte_base.png new file mode 100644 index 0000000..ff6b16b Binary files /dev/null and b/assets/palette/circles/latte_base.png differ diff --git a/assets/palette/circles/latte_blue.png b/assets/palette/circles/latte_blue.png new file mode 100644 index 0000000..ce2f7d7 Binary files /dev/null and b/assets/palette/circles/latte_blue.png differ diff --git a/assets/palette/circles/latte_crust.png b/assets/palette/circles/latte_crust.png new file mode 100644 index 0000000..5d194e3 Binary files /dev/null and b/assets/palette/circles/latte_crust.png differ diff --git a/assets/palette/circles/latte_flamingo.png b/assets/palette/circles/latte_flamingo.png new file mode 100644 index 0000000..9b98d09 Binary files /dev/null and b/assets/palette/circles/latte_flamingo.png differ diff --git a/assets/palette/circles/latte_green.png b/assets/palette/circles/latte_green.png new file mode 100644 index 0000000..5a2ffb8 Binary files /dev/null and b/assets/palette/circles/latte_green.png differ diff --git a/assets/palette/circles/latte_lavender.png b/assets/palette/circles/latte_lavender.png new file mode 100644 index 0000000..e0c9cf3 Binary files /dev/null and b/assets/palette/circles/latte_lavender.png differ diff --git a/assets/palette/circles/latte_mantle.png b/assets/palette/circles/latte_mantle.png new file mode 100644 index 0000000..c6079a8 Binary files /dev/null and b/assets/palette/circles/latte_mantle.png differ diff --git a/assets/palette/circles/latte_maroon.png b/assets/palette/circles/latte_maroon.png new file mode 100644 index 0000000..710ff9b Binary files /dev/null and b/assets/palette/circles/latte_maroon.png differ diff --git a/assets/palette/circles/latte_mauve.png b/assets/palette/circles/latte_mauve.png new file mode 100644 index 0000000..3b24932 Binary files /dev/null and b/assets/palette/circles/latte_mauve.png differ diff --git a/assets/palette/circles/latte_overlay0.png b/assets/palette/circles/latte_overlay0.png new file mode 100644 index 0000000..fe09048 Binary files /dev/null and b/assets/palette/circles/latte_overlay0.png differ diff --git a/assets/palette/circles/latte_overlay1.png b/assets/palette/circles/latte_overlay1.png new file mode 100644 index 0000000..0105500 Binary files /dev/null and b/assets/palette/circles/latte_overlay1.png differ diff --git a/assets/palette/circles/latte_overlay2.png b/assets/palette/circles/latte_overlay2.png new file mode 100644 index 0000000..3d9fe68 Binary files /dev/null and b/assets/palette/circles/latte_overlay2.png differ diff --git a/assets/palette/circles/latte_peach.png b/assets/palette/circles/latte_peach.png new file mode 100644 index 0000000..b46e917 Binary files /dev/null and b/assets/palette/circles/latte_peach.png differ diff --git a/assets/palette/circles/latte_pink.png b/assets/palette/circles/latte_pink.png new file mode 100644 index 0000000..b074fbb Binary files /dev/null and b/assets/palette/circles/latte_pink.png differ diff --git a/assets/palette/circles/latte_red.png b/assets/palette/circles/latte_red.png new file mode 100644 index 0000000..156e4bd Binary files /dev/null and b/assets/palette/circles/latte_red.png differ diff --git a/assets/palette/circles/latte_rosewater.png b/assets/palette/circles/latte_rosewater.png new file mode 100644 index 0000000..0ceafa0 Binary files /dev/null and b/assets/palette/circles/latte_rosewater.png differ diff --git a/assets/palette/circles/latte_sapphire.png b/assets/palette/circles/latte_sapphire.png new file mode 100644 index 0000000..effade3 Binary files /dev/null and b/assets/palette/circles/latte_sapphire.png differ diff --git a/assets/palette/circles/latte_sky.png b/assets/palette/circles/latte_sky.png new file mode 100644 index 0000000..ba2624d Binary files /dev/null and b/assets/palette/circles/latte_sky.png differ diff --git a/assets/palette/circles/latte_subtext0.png b/assets/palette/circles/latte_subtext0.png new file mode 100644 index 0000000..8611869 Binary files /dev/null and b/assets/palette/circles/latte_subtext0.png differ diff --git a/assets/palette/circles/latte_subtext1.png b/assets/palette/circles/latte_subtext1.png new file mode 100644 index 0000000..a496a4f Binary files /dev/null and b/assets/palette/circles/latte_subtext1.png differ diff --git a/assets/palette/circles/latte_surface0.png b/assets/palette/circles/latte_surface0.png new file mode 100644 index 0000000..fe6955e Binary files /dev/null and b/assets/palette/circles/latte_surface0.png differ diff --git a/assets/palette/circles/latte_surface1.png b/assets/palette/circles/latte_surface1.png new file mode 100644 index 0000000..b575af6 Binary files /dev/null and b/assets/palette/circles/latte_surface1.png differ diff --git a/assets/palette/circles/latte_surface2.png b/assets/palette/circles/latte_surface2.png new file mode 100644 index 0000000..ee8b3f1 Binary files /dev/null and b/assets/palette/circles/latte_surface2.png differ diff --git a/assets/palette/circles/latte_teal.png b/assets/palette/circles/latte_teal.png new file mode 100644 index 0000000..e58c998 Binary files /dev/null and b/assets/palette/circles/latte_teal.png differ diff --git a/assets/palette/circles/latte_text.png b/assets/palette/circles/latte_text.png new file mode 100644 index 0000000..d0f68e7 Binary files /dev/null and b/assets/palette/circles/latte_text.png differ diff --git a/assets/palette/circles/latte_yellow.png b/assets/palette/circles/latte_yellow.png new file mode 100644 index 0000000..2ed9eb2 Binary files /dev/null and b/assets/palette/circles/latte_yellow.png differ diff --git a/assets/palette/circles/lavender.png b/assets/palette/circles/lavender.png deleted file mode 100644 index 7a741bf..0000000 Binary files a/assets/palette/circles/lavender.png and /dev/null differ diff --git a/assets/palette/circles/macchiato_base.png b/assets/palette/circles/macchiato_base.png new file mode 100644 index 0000000..e70ec6f Binary files /dev/null and b/assets/palette/circles/macchiato_base.png differ diff --git a/assets/palette/circles/macchiato_blue.png b/assets/palette/circles/macchiato_blue.png new file mode 100644 index 0000000..e58c33b Binary files /dev/null and b/assets/palette/circles/macchiato_blue.png differ diff --git a/assets/palette/circles/macchiato_crust.png b/assets/palette/circles/macchiato_crust.png new file mode 100644 index 0000000..14e5e17 Binary files /dev/null and b/assets/palette/circles/macchiato_crust.png differ diff --git a/assets/palette/circles/macchiato_flamingo.png b/assets/palette/circles/macchiato_flamingo.png new file mode 100644 index 0000000..230268c Binary files /dev/null and b/assets/palette/circles/macchiato_flamingo.png differ diff --git a/assets/palette/circles/macchiato_green.png b/assets/palette/circles/macchiato_green.png new file mode 100644 index 0000000..bd67b99 Binary files /dev/null and b/assets/palette/circles/macchiato_green.png differ diff --git a/assets/palette/circles/macchiato_lavender.png b/assets/palette/circles/macchiato_lavender.png new file mode 100644 index 0000000..5d7958d Binary files /dev/null and b/assets/palette/circles/macchiato_lavender.png differ diff --git a/assets/palette/circles/macchiato_mantle.png b/assets/palette/circles/macchiato_mantle.png new file mode 100644 index 0000000..c5aa743 Binary files /dev/null and b/assets/palette/circles/macchiato_mantle.png differ diff --git a/assets/palette/circles/macchiato_maroon.png b/assets/palette/circles/macchiato_maroon.png new file mode 100644 index 0000000..379f6fb Binary files /dev/null and b/assets/palette/circles/macchiato_maroon.png differ diff --git a/assets/palette/circles/macchiato_mauve.png b/assets/palette/circles/macchiato_mauve.png new file mode 100644 index 0000000..497bf59 Binary files /dev/null and b/assets/palette/circles/macchiato_mauve.png differ diff --git a/assets/palette/circles/macchiato_overlay0.png b/assets/palette/circles/macchiato_overlay0.png new file mode 100644 index 0000000..96bce39 Binary files /dev/null and b/assets/palette/circles/macchiato_overlay0.png differ diff --git a/assets/palette/circles/macchiato_overlay1.png b/assets/palette/circles/macchiato_overlay1.png new file mode 100644 index 0000000..55d4387 Binary files /dev/null and b/assets/palette/circles/macchiato_overlay1.png differ diff --git a/assets/palette/circles/macchiato_overlay2.png b/assets/palette/circles/macchiato_overlay2.png new file mode 100644 index 0000000..847796b Binary files /dev/null and b/assets/palette/circles/macchiato_overlay2.png differ diff --git a/assets/palette/circles/macchiato_peach.png b/assets/palette/circles/macchiato_peach.png new file mode 100644 index 0000000..0b66f63 Binary files /dev/null and b/assets/palette/circles/macchiato_peach.png differ diff --git a/assets/palette/circles/macchiato_pink.png b/assets/palette/circles/macchiato_pink.png new file mode 100644 index 0000000..4bcd900 Binary files /dev/null and b/assets/palette/circles/macchiato_pink.png differ diff --git a/assets/palette/circles/macchiato_red.png b/assets/palette/circles/macchiato_red.png new file mode 100644 index 0000000..ca4126a Binary files /dev/null and b/assets/palette/circles/macchiato_red.png differ diff --git a/assets/palette/circles/macchiato_rosewater.png b/assets/palette/circles/macchiato_rosewater.png new file mode 100644 index 0000000..8985bf5 Binary files /dev/null and b/assets/palette/circles/macchiato_rosewater.png differ diff --git a/assets/palette/circles/macchiato_sapphire.png b/assets/palette/circles/macchiato_sapphire.png new file mode 100644 index 0000000..48f281b Binary files /dev/null and b/assets/palette/circles/macchiato_sapphire.png differ diff --git a/assets/palette/circles/macchiato_sky.png b/assets/palette/circles/macchiato_sky.png new file mode 100644 index 0000000..ad9c6f6 Binary files /dev/null and b/assets/palette/circles/macchiato_sky.png differ diff --git a/assets/palette/circles/macchiato_subtext0.png b/assets/palette/circles/macchiato_subtext0.png new file mode 100644 index 0000000..ca912cd Binary files /dev/null and b/assets/palette/circles/macchiato_subtext0.png differ diff --git a/assets/palette/circles/macchiato_subtext1.png b/assets/palette/circles/macchiato_subtext1.png new file mode 100644 index 0000000..b65b190 Binary files /dev/null and b/assets/palette/circles/macchiato_subtext1.png differ diff --git a/assets/palette/circles/macchiato_surface0.png b/assets/palette/circles/macchiato_surface0.png new file mode 100644 index 0000000..6d50741 Binary files /dev/null and b/assets/palette/circles/macchiato_surface0.png differ diff --git a/assets/palette/circles/macchiato_surface1.png b/assets/palette/circles/macchiato_surface1.png new file mode 100644 index 0000000..65a7e3e Binary files /dev/null and b/assets/palette/circles/macchiato_surface1.png differ diff --git a/assets/palette/circles/macchiato_surface2.png b/assets/palette/circles/macchiato_surface2.png new file mode 100644 index 0000000..c806825 Binary files /dev/null and b/assets/palette/circles/macchiato_surface2.png differ diff --git a/assets/palette/circles/macchiato_teal.png b/assets/palette/circles/macchiato_teal.png new file mode 100644 index 0000000..805733a Binary files /dev/null and b/assets/palette/circles/macchiato_teal.png differ diff --git a/assets/palette/circles/macchiato_text.png b/assets/palette/circles/macchiato_text.png new file mode 100644 index 0000000..f80e82c Binary files /dev/null and b/assets/palette/circles/macchiato_text.png differ diff --git a/assets/palette/circles/macchiato_yellow.png b/assets/palette/circles/macchiato_yellow.png new file mode 100644 index 0000000..0d96180 Binary files /dev/null and b/assets/palette/circles/macchiato_yellow.png differ diff --git a/assets/palette/circles/maroon.png b/assets/palette/circles/maroon.png deleted file mode 100644 index c4bb185..0000000 Binary files a/assets/palette/circles/maroon.png and /dev/null differ diff --git a/assets/palette/circles/mauve.png b/assets/palette/circles/mauve.png deleted file mode 100644 index 055971a..0000000 Binary files a/assets/palette/circles/mauve.png and /dev/null differ diff --git a/assets/palette/circles/mocha_base.png b/assets/palette/circles/mocha_base.png new file mode 100644 index 0000000..3f24ca5 Binary files /dev/null and b/assets/palette/circles/mocha_base.png differ diff --git a/assets/palette/circles/mocha_blue.png b/assets/palette/circles/mocha_blue.png new file mode 100644 index 0000000..daf3659 Binary files /dev/null and b/assets/palette/circles/mocha_blue.png differ diff --git a/assets/palette/circles/mocha_crust.png b/assets/palette/circles/mocha_crust.png new file mode 100644 index 0000000..f24472c Binary files /dev/null and b/assets/palette/circles/mocha_crust.png differ diff --git a/assets/palette/circles/mocha_flamingo.png b/assets/palette/circles/mocha_flamingo.png new file mode 100644 index 0000000..c20d0d5 Binary files /dev/null and b/assets/palette/circles/mocha_flamingo.png differ diff --git a/assets/palette/circles/mocha_green.png b/assets/palette/circles/mocha_green.png new file mode 100644 index 0000000..fd39a1d Binary files /dev/null and b/assets/palette/circles/mocha_green.png differ diff --git a/assets/palette/circles/mocha_lavender.png b/assets/palette/circles/mocha_lavender.png new file mode 100644 index 0000000..1cd74fc Binary files /dev/null and b/assets/palette/circles/mocha_lavender.png differ diff --git a/assets/palette/circles/mocha_mantle.png b/assets/palette/circles/mocha_mantle.png new file mode 100644 index 0000000..dbe8e5c Binary files /dev/null and b/assets/palette/circles/mocha_mantle.png differ diff --git a/assets/palette/circles/mocha_maroon.png b/assets/palette/circles/mocha_maroon.png new file mode 100644 index 0000000..99f8e96 Binary files /dev/null and b/assets/palette/circles/mocha_maroon.png differ diff --git a/assets/palette/circles/mocha_mauve.png b/assets/palette/circles/mocha_mauve.png new file mode 100644 index 0000000..9767fd0 Binary files /dev/null and b/assets/palette/circles/mocha_mauve.png differ diff --git a/assets/palette/circles/mocha_overlay0.png b/assets/palette/circles/mocha_overlay0.png new file mode 100644 index 0000000..f2b26ac Binary files /dev/null and b/assets/palette/circles/mocha_overlay0.png differ diff --git a/assets/palette/circles/mocha_overlay1.png b/assets/palette/circles/mocha_overlay1.png new file mode 100644 index 0000000..a2efaf0 Binary files /dev/null and b/assets/palette/circles/mocha_overlay1.png differ diff --git a/assets/palette/circles/mocha_overlay2.png b/assets/palette/circles/mocha_overlay2.png new file mode 100644 index 0000000..c80c571 Binary files /dev/null and b/assets/palette/circles/mocha_overlay2.png differ diff --git a/assets/palette/circles/mocha_peach.png b/assets/palette/circles/mocha_peach.png new file mode 100644 index 0000000..8b02b71 Binary files /dev/null and b/assets/palette/circles/mocha_peach.png differ diff --git a/assets/palette/circles/mocha_pink.png b/assets/palette/circles/mocha_pink.png new file mode 100644 index 0000000..09997fb Binary files /dev/null and b/assets/palette/circles/mocha_pink.png differ diff --git a/assets/palette/circles/mocha_red.png b/assets/palette/circles/mocha_red.png new file mode 100644 index 0000000..93df3f3 Binary files /dev/null and b/assets/palette/circles/mocha_red.png differ diff --git a/assets/palette/circles/mocha_rosewater.png b/assets/palette/circles/mocha_rosewater.png new file mode 100644 index 0000000..391b314 Binary files /dev/null and b/assets/palette/circles/mocha_rosewater.png differ diff --git a/assets/palette/circles/mocha_sapphire.png b/assets/palette/circles/mocha_sapphire.png new file mode 100644 index 0000000..c98fdf0 Binary files /dev/null and b/assets/palette/circles/mocha_sapphire.png differ diff --git a/assets/palette/circles/mocha_sky.png b/assets/palette/circles/mocha_sky.png new file mode 100644 index 0000000..4552cfa Binary files /dev/null and b/assets/palette/circles/mocha_sky.png differ diff --git a/assets/palette/circles/mocha_subtext0.png b/assets/palette/circles/mocha_subtext0.png new file mode 100644 index 0000000..55befda Binary files /dev/null and b/assets/palette/circles/mocha_subtext0.png differ diff --git a/assets/palette/circles/mocha_subtext1.png b/assets/palette/circles/mocha_subtext1.png new file mode 100644 index 0000000..fd528a4 Binary files /dev/null and b/assets/palette/circles/mocha_subtext1.png differ diff --git a/assets/palette/circles/mocha_surface0.png b/assets/palette/circles/mocha_surface0.png new file mode 100644 index 0000000..063a0b6 Binary files /dev/null and b/assets/palette/circles/mocha_surface0.png differ diff --git a/assets/palette/circles/mocha_surface1.png b/assets/palette/circles/mocha_surface1.png new file mode 100644 index 0000000..727a06a Binary files /dev/null and b/assets/palette/circles/mocha_surface1.png differ diff --git a/assets/palette/circles/mocha_surface2.png b/assets/palette/circles/mocha_surface2.png new file mode 100644 index 0000000..be03753 Binary files /dev/null and b/assets/palette/circles/mocha_surface2.png differ diff --git a/assets/palette/circles/mocha_teal.png b/assets/palette/circles/mocha_teal.png new file mode 100644 index 0000000..d3b7120 Binary files /dev/null and b/assets/palette/circles/mocha_teal.png differ diff --git a/assets/palette/circles/mocha_text.png b/assets/palette/circles/mocha_text.png new file mode 100644 index 0000000..b1af564 Binary files /dev/null and b/assets/palette/circles/mocha_text.png differ diff --git a/assets/palette/circles/mocha_yellow.png b/assets/palette/circles/mocha_yellow.png new file mode 100644 index 0000000..1ba11b4 Binary files /dev/null and b/assets/palette/circles/mocha_yellow.png differ diff --git a/assets/palette/circles/peach.png b/assets/palette/circles/peach.png deleted file mode 100644 index 013a414..0000000 Binary files a/assets/palette/circles/peach.png and /dev/null differ diff --git a/assets/palette/circles/pink.png b/assets/palette/circles/pink.png deleted file mode 100644 index fd38941..0000000 Binary files a/assets/palette/circles/pink.png and /dev/null differ diff --git a/assets/palette/circles/red.png b/assets/palette/circles/red.png deleted file mode 100644 index 75e7a05..0000000 Binary files a/assets/palette/circles/red.png and /dev/null differ diff --git a/assets/palette/circles/rosewater.png b/assets/palette/circles/rosewater.png deleted file mode 100644 index 69432de..0000000 Binary files a/assets/palette/circles/rosewater.png and /dev/null differ diff --git a/assets/palette/circles/sky.png b/assets/palette/circles/sky.png deleted file mode 100644 index b6ef67a..0000000 Binary files a/assets/palette/circles/sky.png and /dev/null differ diff --git a/assets/palette/circles/teal.png b/assets/palette/circles/teal.png deleted file mode 100644 index 1b816d7..0000000 Binary files a/assets/palette/circles/teal.png and /dev/null differ diff --git a/assets/palette/circles/white.png b/assets/palette/circles/white.png deleted file mode 100644 index 143fe73..0000000 Binary files a/assets/palette/circles/white.png and /dev/null differ diff --git a/assets/palette/circles/yellow.png b/assets/palette/circles/yellow.png deleted file mode 100644 index 36b591d..0000000 Binary files a/assets/palette/circles/yellow.png and /dev/null differ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..68bde6a --- /dev/null +++ b/docs/README.md @@ -0,0 +1,239 @@ +

+

๐Ÿ“„ Docs

+

+ +
+ Specs + ยท + Conventions + ยท + Cheat-sheets + ยท + Style-guide +
+ +

+ Documentation for Koy, the human-friendly data serialization language +

+ +  + +### ๐ŸŽ Koy Lang + +Koy is designed to be a minimal, simple and intuitive data serialization language; easy for you, your dog and your average 5 year-old. It has a small set of symbols, not too many rules and only one singular statement. Its lack of complexity makes it the perfect language for your project! easy to implement, debug and modularize. + +Go ahead and check out the [Conventions](https://github.com/Pocco81/koy-lang/blob/main/docs/conventions.md) to learn about the generalities of the language! if you end up liking it, consider checking out the [Specs sheet](https://github.com/Pocco81/koy-lang/blob/main/docs/specs.md) and the [Style Guide](https://github.com/Pocco81/koy-lang/blob/main/docs/style-guide.md). + +  + +### ๐Ÿ“š Cheat sheet + +
+ Cheat sheet for symbols +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Symbols Function Example
// Single-line comment + +``` +// hello world! +``` + +
/**/ Multi-line comment + +``` +/* + This is a multi-line comment and + you are watcing Disney channel! +*/ +``` + +
: Set a key, followed by its data type (optional) and then the value. To define a literal key put it between single quotes ('') + +``` +hello: "world!" + +// specifying data type +temperature:int 12.23 +``` + +
${} Call a variable + +``` +// simple usage +name: "Michael Theodor Mouse" +hello: "Good evening ${name}" + +// with arrays (using the `.` notation) +user: { + name: "Michael", + surnames: "Theodor Mouse" +} +hi: "Good morning ${user.name}" +``` + +
"" Define a normal string + +``` +hello: "world" +``` + +
""" """ Define a multi-line string + +``` +hello: """My name is + Michael Theodor Mouse, but + you can call me Peter. +""" +``` + +
'' Define a literal value + +``` +weird_path: 'pc/\fds!fd/\&24324%!@' +``` + +
[] Define an array + +``` +hosts: [ "omega", "alpha", "gama" ] +``` + +
{} Define an object + +``` +user: { + name: "Michael Theodor Mouse", + age: 92 +} +``` + +
import Import other .koy files + +``` +// single import +import "./directory/settings.koy" + +// multiple imports +import { + "./directory/user0.koy", + "./directory/user1.koy", + "./directory/user2.koy" +} +``` + +
<< Overwrite values from objects + +``` +user: { + name: "Michael Theodor Mouse", + age: 93 +} + +laptop: { + name: "Lenovo Thinkpad", + owner: ${user} << { + name: "Dominic Toretto" + } +} +``` + +
+ +
+
+ +
+ Cheat sheet for rules +  + +
+
+ +
+ Example .koy file using every feature +  + +
+
+ +& diff --git a/samples/python2.py b/samples/python2.py index 4f029c0..d0d5ef9 100644 --- a/samples/python2.py +++ b/samples/python2.py @@ -23,6 +23,7 @@ def get_vcs_settings(): except AttributeError: print(_("Error: Class {} not found").format(type)) continue + else instance = constructor() instance.verbose = verbose diff --git a/tests/wcag-compliance/.npmrc b/tests/wcag-compliance/.npmrc deleted file mode 100644 index 43c97e7..0000000 --- a/tests/wcag-compliance/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/tests/wcag-compliance/README.md b/tests/wcag-compliance/README.md deleted file mode 100644 index 9e1eb48..0000000 --- a/tests/wcag-compliance/README.md +++ /dev/null @@ -1,17 +0,0 @@ -### ๐Ÿ“„ Doc - -This program tests how compliant Catppuccin's variants are with WCAG standards. The test looks like this: ever color is put on top of the `base` color of the palette with a font size of 15; colors from `subtext0` up are expected to be acceptable. In the case of the dark palettes, they should meet Level AA requirements. As for the light palette, however, they must meet a contrast ratio greater than `2.314159265359`. - -#### Dev - -```sh -# clone this repo -npm install # fetch all dependencies -``` - -#### Testing - -```sh -npm start - -``` diff --git a/tests/wcag-compliance/index.js b/tests/wcag-compliance/index.js deleted file mode 100644 index 39f62c9..0000000 --- a/tests/wcag-compliance/index.js +++ /dev/null @@ -1,104 +0,0 @@ -import {variants, labels} from '@catppuccin/palette' -import ColorContrastChecker from "color-contrast-checker" -import chalk from "chalk" -var ccc = new ColorContrastChecker(); - -const FONT_SIZE = 15 -const LATTE_CONTRAST_RATIO = 2.314159265359 - - -function write(msg) { - process.stdout.write(msg) -} - -function get_tabs(str) { - if (str.length > 6) { - return '\t' - } - return '\t\t' -} - -function get_rgb(c) { - return parseInt(c, 16) || c -} - -function gets_rgb(c) { - return get_rgb(c) / 255 <= 0.03928 - ? get_rgb(c) / 255 / 12.92 - : Math.pow((get_rgb(c) / 255 + 0.055) / 1.055, 2.4) -} - -function get_luminance(hexColor) { - return ( - 0.2126 * gets_rgb(hexColor.substr(1, 2)) + - 0.7152 * gets_rgb(hexColor.substr(3, 2)) + - 0.0722 * gets_rgb(hexColor.substr(-2)) - ) -} - -function get_contrast(f, b) { - const L1 = get_luminance(f) - const L2 = get_luminance(b) - return (Math.max(L1, L2) + 0.05) / (Math.min(L1, L2) + 0.05) -} - -function get_text_color(bg_color, preferred_white, preffered_black) { - let white = preferred_white ? preferred_white : '#ffffff' - let black = preffered_black ? preffered_black : '#000000' - const whiteContrast = get_contrast(bg_color, white) - const blackContrast = get_contrast(bg_color, black) - - return whiteContrast > blackContrast ? white : black -} - -function print_color(text, background, preferred_white, preffered_black) { - write( - chalk.bgHex(background)( - chalk.hex( - get_text_color(background, preferred_white, preffered_black) - )(text) - ) - ) -} - -function good_contrast(base, label_color, custom_ratio) { - - let good_contrast_ratio = ccc.isLevelAA(base, label_color, FONT_SIZE) - - if (custom_ratio) { - good_contrast_ratio = ccc.isLevelCustom(base, label_color, custom_ratio) - } - - if (good_contrast_ratio) { - return "โœ…" - } else { - return "โŒ" - } -} - -function get_symbol_space(str) { - if (str.length < 8) { - return '\t' + ' '.repeat(2) - } else if (str.length == 8) { - return ' ' - } - return ' ' -} - -write(chalk.hex('#fff')('|Latte|\t\t|Frappe|\t|Macchiato|\t|Moccha|\n\n')) -for (let label in labels) { - for (let palette in variants) { - let label_color = variants[palette][label]["hex"] - let base = variants[palette]["base"]["hex"] - var symbol_space = get_symbol_space(label) - let good_contrast_ratio = good_contrast(base, label_color) - - if (palette == "latte") { - good_contrast_ratio = good_contrast(base, label_color, LATTE_CONTRAST_RATIO) - } - - print_color(label, base, label_color, label_color) - write(symbol_space + good_contrast_ratio + "\t") - } - console.log('') -} diff --git a/tests/wcag-compliance/node_modules/.package-lock.json b/tests/wcag-compliance/node_modules/.package-lock.json deleted file mode 100644 index e5b9b5f..0000000 --- a/tests/wcag-compliance/node_modules/.package-lock.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "lockfileVersion": 2, - "requires": true, - "packages": { - "node_modules/@catppuccin/palette": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@catppuccin/palette/-/palette-0.1.2.tgz", - "integrity": "sha512-5Gt/goIgHAKjQtMqYhMJeoUWXj5d0HNai3gOPRzDVuz6V4ptTbnSxRyyooOY5OnYn/p0YLEtED/K0JvJPan9Aw==", - "dev": true - }, - "node_modules/chalk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "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==", - "dev": true - } - } -} diff --git a/tests/wcag-compliance/node_modules/color-contrast-checker/.eslintrc.js b/tests/wcag-compliance/node_modules/color-contrast-checker/.eslintrc.js deleted file mode 100644 index beb8ffa..0000000 --- a/tests/wcag-compliance/node_modules/color-contrast-checker/.eslintrc.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = { - "env": { - "browser": true, - "node": true, - "mocha": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 6 - }, - "rules": { - "indent": [ - "error", - 4 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "always" - ] - } -}; \ No newline at end of file diff --git a/tests/wcag-compliance/node_modules/color-contrast-checker/.github/workflows/npmpublish.yml b/tests/wcag-compliance/node_modules/color-contrast-checker/.github/workflows/npmpublish.yml deleted file mode 100644 index 5c98e5b..0000000 --- a/tests/wcag-compliance/node_modules/color-contrast-checker/.github/workflows/npmpublish.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - - run: npm ci - - run: npm test - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - scope: '@Qambar' - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/tests/wcag-compliance/node_modules/color-contrast-checker/LICENSE b/tests/wcag-compliance/node_modules/color-contrast-checker/LICENSE deleted file mode 100644 index 055302e..0000000 --- a/tests/wcag-compliance/node_modules/color-contrast-checker/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 BBC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/tests/wcag-compliance/node_modules/color-contrast-checker/README.md b/tests/wcag-compliance/node_modules/color-contrast-checker/README.md deleted file mode 100644 index a08b648..0000000 --- a/tests/wcag-compliance/node_modules/color-contrast-checker/README.md +++ /dev/null @@ -1,152 +0,0 @@ -# Color Contast Checker - -An accessibility checker tool for validating the color contrast based on WCAG 2.0 and WCAG 2.1 standard. - -The formula (L1/L2) for contrast is based on [ISO-9241-3] and [ANSI-HFES-100-1988] standards as described here : - -http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef -http://www.w3.org/TR/WCAG20/#contrast-ratiodef -https://www.w3.org/TR/WCAG21/#contrast-minimum - -It also supports shorthand color codes e.g #FFF or #000 etc. - -https://www.w3.org/TR/2001/WD-css3-color-20010305#colorunits - -Installation: ------------- - -``` -npm install color-contrast-checker -``` -or using package.json - -``` -{ - "name": "my-app", - .. - "devDependencies": { - .. - "color-contrast-checker": "2.1.0" - } -} -``` -Then do `npm install` - -Usage: ------ - -To check specific WCAG levels -``` -var ccc = new ColorContrastChecker(); - -var color1 = "#FFFFFF"; -var color2 = "#000000; - -if (ccc.isLevelAA(color1, color2, 14)) { - alert("Valid Level AA"); -} else { - alert("Invalid Contrast"); -} - -``` - -To check custom ratios -``` -var ccc = new ColorContrastChecker(); - -var color1 = "#FFFFFF"; -var color2 = "#000000; -var customRatio = 5.7; - -// No need for font size, now that we are using a custom ratio. -// This is because we are no longer checking against WCAG requirements. -if (ccc.isLevelCustom(color1, color2, customRatio)) { - alert("Above given ratio"); -} else { - alert("Invalid Contrast"); -} - -``` - -Advanced Usage: --------------- - -You can pass pairs and get results: - - -``` - var pairs = [ - { - 'colorA': '#000000', - 'colorB': '#000000', // All should fail - 'fontSize': 14 - }, - { - 'colorA': '#000000', - 'colorB': '#FFFFFF', //All should pass - 'fontSize': 14 - }, - { - 'colorA': '#000000', - 'colorB': '#848484', //AAA should fail - 'fontSize': 14 - }, - { - 'colorA': '#000000', - 'colorB': '#848484', //All should pass (because of font) - 'fontSize': 19 - }, - { - 'colorA': '#000000', - 'colorB': '#757575', //AA should pass AAA should fail - 'fontSize': 14 - }, - { - 'colorA': '#000000', - 'colorB': '#656565', //All should fail - 'fontSize': 14 - } - ]; - - var results = ccc.checkPairs(pairs); - -``` - -The result will look like this: - -``` -[ - { - 'WCAG_AA' : false, - 'WCAG_AAA': false - }, - { - 'WCAG_AA' : true, - 'WCAG_AAA': true - }, - { - 'WCAG_AA' : true, - 'WCAG_AAA': false - }, - { - 'WCAG_AA' : true, - 'WCAG_AAA': true - }, - { - 'WCAG_AA' : true, - 'WCAG_AAA': false - }, - { - 'WCAG_AA' : false, - 'WCAG_AAA': false - } -] -``` - -## Tests - - `npm test` - -## Contributing - -In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code. diff --git a/tests/wcag-compliance/node_modules/color-contrast-checker/example/index.html b/tests/wcag-compliance/node_modules/color-contrast-checker/example/index.html deleted file mode 100644 index 4218da1..0000000 --- a/tests/wcag-compliance/node_modules/color-contrast-checker/example/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - Example - Color Contrast Checker - - - -

Color Contrast Checker

-

Try changing the values in the fields below

- - - -
- - - -
- - - -
- -
- : - - -
- : - - - - - - - - \ No newline at end of file diff --git a/tests/wcag-compliance/node_modules/color-contrast-checker/package.json b/tests/wcag-compliance/node_modules/color-contrast-checker/package.json deleted file mode 100644 index 5d3efd2..0000000 --- a/tests/wcag-compliance/node_modules/color-contrast-checker/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "color-contrast-checker", - "version": "2.1.0", - "description": "This is an accessibility validator based on WCAG 2.0 standard for checking the color contrast.", - "main": "src/color-contrast-checker.js", - "directories": { - "example": "example" - }, - "scripts": { - "test": "mocha --reporter spec", - "lint": "eslint test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Qambar/color-contrast-checker.git" - }, - "keywords": [ - "wcag", - "wcag-aa", - "color", - "contrast", - "verifier", - "accessibility", - "standard" - ], - "author": { - "name": "Qambar Raza", - "email": "qambar.raza@bbc.co.uk", - "url": "http://www.bbc.co.uk" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/Qambar/color-contrast-checker/issues" - }, - "homepage": "https://github.com/Qambar/color-contrast-checker#readme", - "gitHead": "45b65d45fc281ba90529183ff412299a7c1379d0", - "_id": "color-contrast-checker@1.2.0", - "_shasum": "a43bd41523775450e6f31ce38e64b44312157325", - "_from": "color-contrast-checker@1.2.0", - "_npmVersion": "2.13.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "qambar", - "email": "qambar.raza@bbc.co.uk" - }, - "dist": { - "shasum": "a43bd41523775450e6f31ce38e64b44312157325", - "tarball": "http://registry.npmjs.org/color-contrast-checker/-/color-contrast-checker-1.2.0.tgz" - }, - "maintainers": [ - { - "name": "qambar", - "email": "qambar.raza@bbc.co.uk" - } - ], - "_resolved": "http://registry.npmjs.org/color-contrast-checker/-/color-contrast-checker-1.2.0.tgz", - "devDependencies": { - "chai": "^4.2.0", - "eslint": "^5.12.1", - "mocha": "^5.2.0" - } -} diff --git a/tests/wcag-compliance/node_modules/color-contrast-checker/src/color-contrast-checker.js b/tests/wcag-compliance/node_modules/color-contrast-checker/src/color-contrast-checker.js deleted file mode 100644 index d4075b4..0000000 --- a/tests/wcag-compliance/node_modules/color-contrast-checker/src/color-contrast-checker.js +++ /dev/null @@ -1,241 +0,0 @@ -"use strict"; - -/** - * Color Contast Checker - * An accessibility checker tool for validating the color contrast based on WCAG 2.0 standard. - * var ccc = new ColorContrastChecker(); - - * var color1 = "#FFFFFF"; - * var color2 = "#000000; - - * if (ccc.isLevelAA(color1, color2, 14)) { - * alert("Valid Level AA"); - * } else { - * alert("Invalid Contrast"); - * } - */ - -function ColorContrastChecker() {}; - -module.exports = ColorContrastChecker; - -ColorContrastChecker.prototype = { - fontSize: 14, - rgbClass : { - toString: function() { - return ""; - } - }, - isValidSixDigitColorCode: function (hex){ - var regSixDigitColorcode = /^(#)?([0-9a-fA-F]{6})?$/; - return regSixDigitColorcode.test(hex); - }, - isValidThreeDigitColorCode: function (hex){ - var regThreeDigitColorcode = /^(#)?([0-9a-fA-F]{3})?$/; - return regThreeDigitColorcode.test(hex); - }, - isValidColorCode : function (hex){ - return this.isValidSixDigitColorCode(hex) || this.isValidThreeDigitColorCode(hex); - }, - isValidRatio : function (ratio){ - return (typeof ratio === "number"); - }, - convertColorToSixDigit: function (hex) { - return "#" + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3]; - }, - hexToLuminance: function (color) { - if (!this.isValidColorCode(color)) { - throw new Error("Invalid Color :" + color); - } - - if (this.isValidThreeDigitColorCode(color)) { - color = this.convertColorToSixDigit(color); - } - - color = this.getRGBFromHex(color); - - var LRGB = this.calculateLRGB(color); - - return this.calculateLuminance(LRGB); - }, - check: function (colorA, colorB, fontSize, customRatio) { - if (typeof fontSize !== "undefined") { - this.fontSize = fontSize; - } - - if(!colorA || !colorB) { - return false; - } - - var l1 = this.hexToLuminance(colorA); /* higher value */ - var l2 = this.hexToLuminance(colorB); /* lower value */ - var contrastRatio = this.getContrastRatio(l1, l2); - - if (typeof customRatio !== "undefined") { - if (!this.isValidRatio(customRatio)) { - return false; - } - return this.verifyCustomContrastRatio(contrastRatio, customRatio); - } else { - return this.verifyContrastRatio(contrastRatio); - } - }, - checkPairs: function (pairs, customRatio) { - var results = []; - - for (var i in pairs) { - var pair = pairs[i]; - if (typeof pair.fontSize !== "undefined") { - results.push( - this.check( - pair.colorA, - pair.colorB, - pair.fontSize, - customRatio - ) - ); - } else { - results.push( - this.check( - pair.colorA, - pair.colorB, - void 0, - customRatio - ) - ); - } - } - return results; - }, - calculateLuminance: function(lRGB) { - return (0.2126 * lRGB.r) + (0.7152 * lRGB.g) + (0.0722 * lRGB.b); - }, - isLevelAA : function(colorA, colorB, fontSize) { - var result = this.check(colorA, colorB, fontSize); - return result.WCAG_AA; - }, - isLevelAAA : function(colorA, colorB, fontSize) { - var result = this.check(colorA, colorB, fontSize); - return result.WCAG_AAA; - }, - isLevelCustom : function(colorA, colorB, ratio) { - var result = this.check(colorA, colorB, void 0, ratio); - return result.customRatio; - }, - getRGBFromHex : function(color) { - - var rgb = Object.create(this.rgbClass), - rVal, - gVal, - bVal; - - if (typeof color !== "string") { - throw new Error("must use string"); - } - - rVal = parseInt(color.slice(1, 3), 16); - gVal = parseInt(color.slice(3, 5), 16); - bVal = parseInt(color.slice(5, 7), 16); - - rgb.r = rVal; - rgb.g = gVal; - rgb.b = bVal; - - return rgb; - }, - calculateSRGB : function(rgb) { - var sRGB = Object.create(this.rgbClass), - key; - - for (key in rgb) { - if (rgb.hasOwnProperty(key)) { - sRGB[key] = parseFloat((rgb[key] / 255), 10); - } - } - - return sRGB; - }, - calculateLRGB: function (rgb) { - var sRGB = this.calculateSRGB(rgb); - var lRGB = Object.create(this.rgbClass), - key, - val = 0; - - for (key in sRGB) { - if (sRGB.hasOwnProperty(key)) { - val = parseFloat(sRGB[key], 10); - if (val <= 0.03928) { - lRGB[key] = (val / 12.92); - } else { - lRGB[key] = Math.pow(((val + 0.055) / 1.055), 2.4); - } - } - } - - return lRGB; - }, - getContrastRatio : function(lumA, lumB) { - var ratio, - lighter, - darker; - - if (lumA >= lumB) { - lighter = lumA; - darker = lumB; - } else { - lighter = lumB; - darker = lumA; - } - - ratio = (lighter + 0.05) / (darker + 0.05); - - return ratio; - }, - verifyContrastRatio : function(ratio) { - - - var resultsClass = { - toString: function() { - return "< WCAG-AA: " + ((this.WCAG_AA) ? "pass" : "fail") + - " WCAG-AAA: " + ((this.WCAG_AAA) ? "pass" : "fail") + - " >"; - } - }; - var WCAG_REQ_RATIO_AA_LG = 3.0, - WCAG_REQ_RATIO_AA_SM = 4.5, - WCAG_REQ_RATIO_AAA_LG = 4.5, - WCAG_REQ_RATIO_AAA_SM = 7.0, - WCAG_FONT_CUTOFF = 18; - - var results = Object.create(resultsClass), - fontSize = this.fontSize || 14; - - if (fontSize >= WCAG_FONT_CUTOFF) { - results.WCAG_AA = (ratio >= WCAG_REQ_RATIO_AA_LG); - results.WCAG_AAA = (ratio >= WCAG_REQ_RATIO_AAA_LG); - } else { - results.WCAG_AA = (ratio >= WCAG_REQ_RATIO_AA_SM); - results.WCAG_AAA = (ratio >= WCAG_REQ_RATIO_AAA_SM); - } - - return results; - }, - verifyCustomContrastRatio : function(inputRatio, checkRatio) { - - var resultsClass = { - toString: function() { - return "< Custom Ratio: " + ((this.customRatio) ? "pass" : "fail") + - " >"; - } - }; - - var results = Object.create(resultsClass); - - results.customRatio = (inputRatio >= checkRatio); - return results; - } - -}; diff --git a/tests/wcag-compliance/node_modules/color-contrast-checker/test/color-contrast-checker.js b/tests/wcag-compliance/node_modules/color-contrast-checker/test/color-contrast-checker.js deleted file mode 100644 index aedef22..0000000 --- a/tests/wcag-compliance/node_modules/color-contrast-checker/test/color-contrast-checker.js +++ /dev/null @@ -1,342 +0,0 @@ -"use strict"; - -var expect = require("chai").expect; -var ColorContrastChecker = require("../src/color-contrast-checker"); -var ccc = new ColorContrastChecker(); - -describe("Three Digit Color Code Lengths", function() { - it("should accept 3 digit color code", function() { - var result = ccc.isValidThreeDigitColorCode("#FFF"); - expect(result).to.be.true; - }); - - it("should reject 2 digit color code", function() { - var result = ccc.isValidThreeDigitColorCode("#FF"); - expect(result).to.be.false; - }); - - it("should reject 4 digit color code", function() { - var result = ccc.isValidThreeDigitColorCode("#FFFF"); - expect(result).to.be.false; - }); - - it("should reject 6 digit color code", function() { - var result = ccc.isValidThreeDigitColorCode("#FFFFFF"); - expect(result).to.be.false; - }); -}); - -describe("Six Digit Color Code Lengths", function() { - it("should accept 6 digit color code", function() { - var result = ccc.isValidSixDigitColorCode("#FFFFFF"); - expect(result).to.be.true; - }); - - it("should reject 5 digit color code", function() { - var result = ccc.isValidSixDigitColorCode("#FFFFF"); - expect(result).to.be.false; - }); - - it("should reject 7 digit color code", function() { - var result = ccc.isValidSixDigitColorCode("#FFFFFFF"); - expect(result).to.be.false; - }); - - it("should reject 3 digit color code", function() { - var result = ccc.isValidSixDigitColorCode("#FFF"); - expect(result).to.be.false; - }); -}); - -describe("Supported Color Code Lengths", function() { - it("should accept 3 digit color code", function() { - var result = ccc.isValidColorCode("#FFF"); - expect(result).to.be.true; - }); - - it("should accept 6 digit color code", function() { - var result = ccc.isValidColorCode("#FFFFFF"); - expect(result).to.be.true; - }); - - it("should reject 7 digit color code", function() { - var result = ccc.isValidColorCode("#FFFFFFF"); - expect(result).to.be.false; - }); -}); - -describe("Supported Custom Ratio Inputs", function() { - it("should accept an integer", function() { - var result = ccc.isValidRatio(1); - expect(result).to.be.true; - }); - - it("should accept a float", function() { - var result = ccc.isValidRatio(3.2); - expect(result).to.be.true; - }); - - it("should reject a string", function() { - var result = ccc.isValidRatio("3.2"); - expect(result).to.be.false; - }); -}); - -describe("Convert Color from 3 digit to 6 digit", function() { - it("should convert 3 digit color to 6 digit", function() { - var result = ccc.convertColorToSixDigit("#FFF"); - expect(result).to.equal("#FFFFFF"); - }); -}); - -describe("Convert Hex to Luminance", function() { - it("should convert 3 digit color luminance value", function() { - var result = ccc.hexToLuminance("#FFF"); - expect(result).to.equal(1); - }); - - it("should convert 6 digit color luminance value", function() { - var result = ccc.hexToLuminance("#FFFFFF"); - expect(result).to.equal(1); - }); - - it("should convert blue color luminance value", function() { - var result = ccc.hexToLuminance("#0000FF"); - expect(result).to.equal(0.0722); - }); - - it("should convert yellow color luminance value", function() { - var result = ccc.hexToLuminance("#ffff00"); - expect(result).to.equal(0.9278); - }); -}); - -describe("Basic Validation for LevelAA", function() { - it("should return true when contrast is valid for three digit color codes", function() { - var result = ccc.isLevelAA("#FFF", "#000", 14); - expect(result).to.be.true; - }); - - it("should return true when contrast is valid", function() { - var result = ccc.isLevelAA("#FFFFFF", "#000000", 14); - expect(result).to.be.true; - }); - - it("should return false when contrast is invalid", function() { - var result = ccc.isLevelAA("#000000", "#000000", 14); - expect(result).to.be.false; - }); -}); - -describe("Basic Validation for LevelAAA", function() { - it("should return true when contrast is valid for three digit color codes", function() { - var result = ccc.isLevelAA("#FFF", "#000", 14); - expect(result).to.be.true; - }); - - it("should return true when contrast is valid", function() { - var result = ccc.isLevelAA("#FFFFFF", "#000000", 14); - expect(result).to.be.true; - }); - - it("should return false when contrast is invalid", function() { - var result = ccc.isLevelAA("#000000", "#000000", 14); - expect(result).to.be.false; - }); -}); - -describe("Basic Validation for Custom Ratio", function() { - it("should return true when contrast is valid for three digit color codes", function() { - var result = ccc.isLevelCustom("#FFF", "#000", 5); - expect(result).to.be.true; - }); - - it("should return true when contrast is valid", function() { - var result = ccc.isLevelCustom("#FFFFFF", "#000000", 5); - expect(result).to.be.true; - }); - - it("should return false when contrast is invalid", function() { - var result = ccc.isLevelCustom("#000000", "#000000", 5); - expect(result).to.be.false; - }); -}); - -describe("Six Digit Pair Validation for LevelAAA", function() { - var pairs = [ - { - "colorA": "#000000", - "colorB": "#000000", // All should fail - "fontSize": 14 - }, - { - "colorA": "#000000", - "colorB": "#FFFFFF", //All should pass - "fontSize": 14 - }, - { - "colorA": "#000000", - "colorB": "#998899", //AAA should fail - "fontSize": 14 - }, - { - "colorA": "#000000", - "colorB": "#998899", //All should pass (because of font) - "fontSize": 19 - }, - { - "colorA": "#000000", - "colorB": "#887788", //AA should pass AAA should fail - "fontSize": 14 - }, - { - "colorA": "#000000", - "colorB": "#656565", //All should fail - "fontSize": 14 - } - ]; - - - var expectedResults = [ - { WCAG_AA: false, WCAG_AAA: false }, - { WCAG_AA: true, WCAG_AAA: true }, - { WCAG_AA: true, WCAG_AAA: false }, - { WCAG_AA: true, WCAG_AAA: true }, - { WCAG_AA: true, WCAG_AAA: false }, - { WCAG_AA: false, WCAG_AAA: false } ]; - - function objectsAreSame(x, y) { - var objectsAreSame = true; - x.forEach((element, index) => { - if (element.WCAG_AA !== y[index].WCAG_AA) { - objectsAreSame = false; - } - if (element.WCAG_AAA !== y[index].WCAG_AAA) { - objectsAreSame = false; - } - }); - return objectsAreSame; - } - - it("should return the expectedResults for checkPairs", function() { - var results = ccc.checkPairs(pairs); - expect(results).to.be.an("array"); - expect(results).to.have.lengthOf(6); - expect(objectsAreSame(results, expectedResults)).to.be.true; - }); -}); - -describe("Three Digit Pair Validation for LevelAAA", function() { - var pairs = [ - { - "colorA": "#000", - "colorB": "#000", // All should fail - "fontSize": 14 - }, - { - "colorA": "#000", - "colorB": "#FFF", //All should pass - "fontSize": 14 - }, - { - "colorA": "#000", - "colorB": "#989", //AAA should fail - "fontSize": 14 - }, - { - "colorA": "#000", - "colorB": "#989", //All should pass (because of font) - "fontSize": 19 - }, - { - "colorA": "#000", - "colorB": "#878", //AA should pass AAA should fail - "fontSize": 14 - }, - { - "colorA": "#000", - "colorB": "#656", //All should fail - "fontSize": 14 - } - ]; - - - var expectedResults = [ - { WCAG_AA: false, WCAG_AAA: false }, - { WCAG_AA: true, WCAG_AAA: true }, - { WCAG_AA: true, WCAG_AAA: false }, - { WCAG_AA: true, WCAG_AAA: true }, - { WCAG_AA: true, WCAG_AAA: false }, - { WCAG_AA: false, WCAG_AAA: false } ]; - - function objectsAreSame(x, y) { - var objectsAreSame = true; - x.forEach((element, index) => { - if (element.WCAG_AA !== y[index].WCAG_AA) { - objectsAreSame = false; - } - if (element.WCAG_AAA !== y[index].WCAG_AAA) { - objectsAreSame = false; - } - }); - return objectsAreSame; - } - it("should return the expectedResults for checkPairs", function() { - var results = ccc.checkPairs(pairs); - expect(results).to.be.an("array"); - expect(results).to.have.lengthOf(6); - expect(objectsAreSame(results, expectedResults)).to.be.true; - }); -}); - -describe("Six Digit Pair Validation for Custom Ratio", function() { - var pairs = [ - { - "colorA": "#000000", - "colorB": "#000000", // This should fail - "fontSize": 14 - }, - { - "colorA": "#000000", - "colorB": "#FFFFFF", // This should pass - "fontSize": 14 - }, - { - "colorA": "#000000", - "colorB": "#998899", // This should pass - "fontSize": 14 - }, - { - "colorA": "#000000", - "colorB": "#656565", // This should fail - "fontSize": 14 - } - ]; - - - var expectedResults = [ - { customRatio: false }, - { customRatio: true }, - { customRatio: true }, - { customRatio: false } ]; - - function objectsAreSame(x, y) { - var objectsAreSame = true; - x.forEach((element, index) => { - if (element.WCAG_AA !== y[index].WCAG_AA) { - objectsAreSame = false; - } - if (element.WCAG_AAA !== y[index].WCAG_AAA) { - objectsAreSame = false; - } - }); - return objectsAreSame; - } - - it("should return the expectedResults for checkPairs", function() { - var results = ccc.checkPairs(pairs, 5.6); - expect(results).to.be.an("array"); - expect(results).to.have.lengthOf(4); - expect(objectsAreSame(results, expectedResults)).to.be.true; - }); -}); diff --git a/tests/wcag-compliance/package.json b/tests/wcag-compliance/package.json deleted file mode 100644 index 4212881..0000000 --- a/tests/wcag-compliance/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "wcag-compliance", - "version": "0.1.0", - "description": "WCAG compliance checker", - "main": "index.js", - "type": "module", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "start": "node index.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/catppuccin/catppuccin.git#dev" - }, - "keywords": [ - "wcag-compliance", - "catppuccin", - "test" - ], - "author": "Catppuccin Org", - "license": "MIT", - "bugs": { - "url": "https://github.com/catppuccin/catppuccin/issues" - }, - "homepage": "https://github.com/catppuccin/catppuccin/tree/dev#readme", - "devDependencies": { - "@catppuccin/palette": "^0.1.0", - "chalk": "^5.0.1", - "color-contrast-checker": "^2.1.0" - } -}