61 Commits

Author SHA1 Message Date
ConnorSkees
76290a4159 further refactor parsing of hex colors 2020-06-18 18:22:58 -04:00
ConnorSkees
3552fbcb99 allow negative values in single arg hsl/hsla 2020-06-03 21:23:33 -04:00
ConnorSkees
29f7b286b0 handle negative values in 1arg rgba? 2020-06-02 17:06:31 -04:00
ConnorSkees
1d518efeaf refactor lowercasing of idents
avoid creating more strings than necessary
2020-04-30 19:43:59 -04:00
ConnorSkees
f158f03708 better handle named color transparent 2020-04-26 22:51:38 -04:00
ConnorSkees
637dc39544 prefer #[ignore] over commenting out tests 2020-04-25 12:16:10 -04:00
ConnorSkees
7181077163 interchangeable underscore/hyphen in builtin functions 2020-04-13 12:57:25 -04:00
ConnorSkees
dee4462cc7 add sass color spec tests verbatim 2020-04-04 14:13:37 -04:00
ConnorSkees
01c1cf3bb3 prefer the word lightness over luminance 2020-03-23 12:52:23 -04:00
ConnorSkees
6460c97ef4 better error messages for zero arg hsl(a) 2020-03-22 23:41:02 -04:00
ConnorSkees
6aae433d21 better error message for missing rgb/rgba args 2020-03-22 23:28:19 -04:00
ConnorSkees
20f702b40b Implement 1 arg for hsl and hsla 2020-03-19 23:44:53 -04:00
ConnorSkees
8a811dae9e Properly parse spaced lists 2020-03-19 21:40:36 -04:00
ConnorSkees
404c7fb66a Various tests 2020-02-24 09:38:05 -05:00
ConnorSkees
42cbd685d3 Refactor how function call args are parsed 2020-02-16 21:34:52 -05:00
ConnorSkees
f57da880b6 fmt 2020-02-16 17:49:37 -05:00
ConnorSkees
d4dd360682 Handle number passed to invert() 2020-02-16 17:00:31 -05:00
ConnorSkees
948c489785 Properly implement weighted inversion 2020-02-16 16:53:28 -05:00
ConnorSkees
ca0e2d47cb Grayscale function behaves differently when given a number 2020-02-16 16:11:24 -05:00
ConnorSkees
fcb5069f82 Keep track of original values given from hsla() 2020-02-16 15:06:02 -05:00
ConnorSkees
6d0686866e hsla doesn't care about units 2020-02-16 10:28:33 -05:00
ConnorSkees
72ae82b6c5 Create test for interchangable - _ in builtins 2020-02-15 11:47:37 -05:00
ConnorSkees
3823a0f9cd Use same implementation for rgb() and rgba() 2020-02-15 07:06:45 -05:00
ConnorSkees
4702461fe7 Allow 3 arguments in rgba() 2020-02-15 07:00:24 -05:00
ConnorSkees
46e4ccd5f9 Allow alpha in hsl() 2020-02-15 06:55:20 -05:00
ConnorSkees
a35fa119e0 Implement builtin function ie-hex-str() 2020-02-14 20:34:12 -05:00
ConnorSkees
19f59efd98 Handle alpha over 1 (a little bit) 2020-02-14 20:13:58 -05:00
ConnorSkees
bb7e47a4fb Implement builtin function scale-color() 2020-02-14 19:51:24 -05:00
ConnorSkees
e2d1adf8b9 Implement builtin function adjust-color() 2020-02-14 19:29:50 -05:00
ConnorSkees
ae9b97a6b2 Properly handle hue values above and below maximum 2020-02-14 18:02:48 -05:00
ConnorSkees
4303bd451c Handle negative hues 2020-02-14 17:52:25 -05:00
ConnorSkees
a328617001 Implement builtin function change-color() 2020-02-14 17:38:10 -05:00
ConnorSkees
af95658953 Implement builtin function mix() 2020-02-14 16:56:23 -05:00
ConnorSkees
3af2292d5b Implement builtin function complement() 2020-02-14 12:56:28 -05:00
ConnorSkees
af8bd516b2 Implement builtin function grayscale() 2020-02-14 12:11:08 -05:00
ConnorSkees
08bfa8f145 Implement one and two args for rgba() 2020-02-14 11:52:31 -05:00
ConnorSkees
a2ddc8016f Implement builtin functions fade-in(), fade-out(), opacify(), and transparentize() 2020-02-14 11:10:25 -05:00
ConnorSkees
38802b69c5 Fix hue algorithm when red == blue and red > green 2020-02-14 09:46:50 -05:00
ConnorSkees
201f97a914 Fix how hue is calculated when color channels are equal 2020-02-14 09:37:05 -05:00
ConnorSkees
be84350d19 Implement builtin functions saturate() and desaturate() 2020-02-14 09:05:57 -05:00
ConnorSkees
c7c1ad5fe5 Implement builtin function darken() 2020-02-14 08:54:43 -05:00
ConnorSkees
db8e8eaebb Implement builtin function lighten() 2020-02-14 08:43:10 -05:00
ConnorSkees
6427a7ab81 Implement builtin function adjust-hue 2020-02-14 08:15:19 -05:00
ConnorSkees
f6b27177ba Use Number as to represent color channels so precision is not lost 2020-02-09 18:53:48 -05:00
ConnorSkees
2f54de15c5 Allow optional alpha argument in rgb() 2020-02-09 15:07:29 -05:00
ConnorSkees
d14ac11396 Implement weight for invert() 2020-02-09 13:44:27 -05:00
ConnorSkees
1269c9f662 Initial implementation of invert() (no support for weight argument) 2020-02-09 13:31:58 -05:00
ConnorSkees
8638e2f251 Implement builtin functions hue(), saturation(), and lightness() 2020-02-09 12:18:41 -05:00
ConnorSkees
835fe61bb4 Implement subtraction for colors 2020-02-09 11:07:13 -05:00
ConnorSkees
2b3d8fcce7 Implement addition between colors and idents 2020-02-09 10:49:37 -05:00