@hero-design/colors 7.25.1 → 7.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/.rollup.cache/root/hero-design/packages/colors/types/colorScales/createColorScales.js +3 -3
  2. package/.rollup.cache/root/hero-design/packages/colors/types/colorScales/createColorScales.js.map +1 -1
  3. package/.rollup.cache/root/hero-design/packages/colors/types/colorScales/index.d.ts +3 -1
  4. package/.rollup.cache/root/hero-design/packages/colors/types/colorScales/index.js +29 -26
  5. package/.rollup.cache/root/hero-design/packages/colors/types/colorScales/index.js.map +1 -1
  6. package/.rollup.cache/root/hero-design/packages/colors/types/colorScales/mixColor.d.ts +6 -0
  7. package/.rollup.cache/root/hero-design/packages/colors/types/colorScales/mixColor.js +11 -0
  8. package/.rollup.cache/root/hero-design/packages/colors/types/colorScales/mixColor.js.map +1 -0
  9. package/.rollup.cache/root/hero-design/packages/colors/types/defaultMobilePalette/index.d.ts +19 -0
  10. package/.rollup.cache/root/hero-design/packages/colors/types/defaultMobilePalette/index.js +20 -1
  11. package/.rollup.cache/root/hero-design/packages/colors/types/defaultMobilePalette/index.js.map +1 -1
  12. package/.rollup.cache/root/hero-design/packages/colors/types/eBensPalette/index.d.ts +16 -0
  13. package/.rollup.cache/root/hero-design/packages/colors/types/index.d.ts +2 -2
  14. package/.rollup.cache/root/hero-design/packages/colors/types/index.js +2 -2
  15. package/.rollup.cache/root/hero-design/packages/colors/types/index.js.map +1 -1
  16. package/.rollup.cache/root/hero-design/packages/colors/types/jobsPalette/index.d.ts +18 -0
  17. package/.rollup.cache/root/hero-design/packages/colors/types/swagPalette/index.d.ts +15 -0
  18. package/.rollup.cache/root/hero-design/packages/colors/types/tsconfig.tsbuildinfo +1 -1
  19. package/.rollup.cache/root/hero-design/packages/colors/types/walletPalette/index.d.ts +18 -0
  20. package/.rollup.cache/root/hero-design/packages/colors/types/workPalette/index.d.ts +17 -0
  21. package/.turbo/turbo-build.log +17 -17
  22. package/es/index.js +95 -57
  23. package/lib/index.js +95 -56
  24. package/package.json +3 -3
  25. package/src/colorScales/createColorScales.ts +5 -5
  26. package/src/colorScales/index.ts +30 -26
  27. package/src/colorScales/mixColor.ts +12 -0
  28. package/src/defaultMobilePalette/index.ts +54 -13
  29. package/src/index.ts +2 -1
  30. package/types/colorScales/index.d.ts +3 -1
  31. package/types/colorScales/mixColor.d.ts +6 -0
  32. package/types/defaultMobilePalette/index.d.ts +19 -0
  33. package/types/eBensPalette/index.d.ts +16 -0
  34. package/types/index.d.ts +2 -2
  35. package/types/jobsPalette/index.d.ts +18 -0
  36. package/types/swagPalette/index.d.ts +15 -0
  37. package/types/tsconfig.tsbuildinfo +1 -1
  38. package/types/walletPalette/index.d.ts +18 -0
  39. package/types/workPalette/index.d.ts +17 -0
package/es/index.js CHANGED
@@ -681,59 +681,68 @@ Values.VERSION = 'v2.1.1';
681
681
 
682
682
  var Values$1 = Values;
683
683
 
684
- const STEPS = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95];
684
+ const mixColor = color => {
685
+ const colorValues = new Values$1(color);
686
+ return {
687
+ tint: step => colorValues.tint(step).hexString(),
688
+ shade: step => colorValues.shade(step).hexString(),
689
+ base: colorValues.hexString()
690
+ };
691
+ };
685
692
 
693
+ const STEPS = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95];
686
694
  const createColorScales = base => {
687
- const colorValues = new Values$1(base);
695
+ const mixed = mixColor(base);
688
696
  return Object.assign(Object.assign({}, STEPS.reduce((acc, step) => Object.assign(Object.assign({}, acc), {
689
- [`lighten${step}`]: colorValues.tint(step).hexString(),
690
- [`darken${step}`]: colorValues.shade(step).hexString()
697
+ [`lighten${step}`]: mixed.tint(step),
698
+ [`darken${step}`]: mixed.shade(step)
691
699
  }), {})), {
692
- base: colorValues.hexString()
700
+ base: mixed.base
693
701
  });
694
702
  };
695
703
 
696
704
  const BASE_COLORS = {
705
+ aliceBlue: '#ecf0ff',
697
706
  antiFlashWhite: '#f1f2f3',
698
- blue: '#1dbeee',
707
+ apple: '#e3602a',
699
708
  blue1: '#5a68e2',
700
- nightBlue: '#353957',
709
+ blue: '#1dbeee',
710
+ cornflowerBlue: '#5d80f0',
711
+ currant: '#48000a',
701
712
  darkBlue: '#25006e',
702
- maasstrichtBlue: '#001f23',
703
- ultramarineBlue: '#4568fb',
704
- royalBlue: '#5a68e2',
713
+ deepSaffron: '#ffa234',
714
+ emerald: '#5ace7d',
705
715
  frenchSky: '#8999ff',
706
- aliceBlue: '#ecf0ff',
707
- jordyBlue: '#92abfc',
708
- cornflowerBlue: '#5d80f0',
709
- paua: '#130066',
716
+ gold: '#ffd500',
710
717
  green: '#01b39c',
711
- emerald: '#5ace7d',
712
- pineGreen: '#017d6d',
713
- honeydew: '#f0fef4',
714
718
  grey: '#a3a6ac',
715
- currant: '#48000a',
716
- sonicSilver: '#737479',
717
719
  grotesqueGreen: '#6af293',
720
+ hitPink: '#ffad79',
721
+ honeydew: '#f0fef4',
722
+ jordyBlue: '#92abfc',
723
+ linen: '#fcebe7',
724
+ maasstrichtBlue: '#001f23',
725
+ mauve: '#c38cee',
718
726
  mellowApricot: '#ffbe71',
719
- deepSaffron: '#ffa234',
727
+ nightBlue: '#353957',
728
+ pastelRed: '#f46363',
729
+ paua: '#130066',
730
+ peach: '#f8ac7d',
731
+ pineGreen: '#017d6d',
720
732
  pink: '#fe56aa',
721
- hitPink: '#ffad79',
722
- apple: '#e3602a',
723
733
  purple: '#be83cf',
734
+ royalBlue: '#5a68e2',
724
735
  scarletGum: '#401960',
725
- vodka: '#b5c3fd',
726
- peach: '#f8ac7d',
727
- pastelRed: '#f46363',
728
- vermilion: '#de350b',
729
- linen: '#fcebe7',
736
+ seashell: '#fff6eb',
737
+ silverChalice: '#abacaf',
730
738
  smalt: '#003580',
731
- violet: '#7622d7',
739
+ sonicSilver: '#737479',
740
+ ultramarineBlue: '#4568fb',
741
+ vermilion: '#de350b',
732
742
  violet1: '#8505a2',
733
- mauve: '#c38cee',
734
- yellow: '#fadb14',
735
- seashell: '#fff6eb',
736
- gold: '#ffd500'
743
+ violet: '#7622d7',
744
+ vodka: '#b5c3fd',
745
+ yellow: '#fadb14'
737
746
  };
738
747
  const colorScales = Object.entries(BASE_COLORS).reduce((acc, [key, value]) => Object.assign(Object.assign({}, acc), {
739
748
  [key]: createColorScales(value)
@@ -750,7 +759,7 @@ const {
750
759
  purple,
751
760
  vermilion: vermilion$1,
752
761
  smalt,
753
- violet: violet$2,
762
+ violet: violet$3,
754
763
  yellow
755
764
  } = colorScales;
756
765
  const palette$6 = {
@@ -824,15 +833,15 @@ const palette$6 = {
824
833
  smaltLight45: smalt.lighten45,
825
834
  smaltLight75: smalt.lighten75,
826
835
  smaltLight90: smalt.lighten90,
827
- violet: violet$2.base,
828
- violetDark15: violet$2.darken15,
829
- violetDark30: violet$2.darken30,
830
- violetDark45: violet$2.darken45,
831
- violetDark75: violet$2.darken75,
832
- violetLight30: violet$2.lighten30,
833
- violetLight60: violet$2.lighten60,
834
- violetLight75: violet$2.lighten75,
835
- violetLight90: violet$2.lighten90,
836
+ violet: violet$3.base,
837
+ violetDark15: violet$3.darken15,
838
+ violetDark30: violet$3.darken30,
839
+ violetDark45: violet$3.darken45,
840
+ violetDark75: violet$3.darken75,
841
+ violetLight30: violet$3.lighten30,
842
+ violetLight60: violet$3.lighten60,
843
+ violetLight75: violet$3.lighten75,
844
+ violetLight90: violet$3.lighten90,
836
845
  yellow: yellow.base,
837
846
  yellowDark15: yellow.darken15,
838
847
  yellowDark75: yellow.darken75,
@@ -841,23 +850,33 @@ const palette$6 = {
841
850
  };
842
851
 
843
852
  const {
844
- maasstrichtBlue,
853
+ aliceBlue,
854
+ antiFlashWhite,
855
+ apple: apple$1,
856
+ currant: currant$1,
857
+ darkBlue,
858
+ deepSaffron,
859
+ emerald,
860
+ gold: gold$1,
845
861
  grey,
846
- pastelRed,
862
+ honeydew,
863
+ linen,
864
+ maasstrichtBlue,
865
+ mauve: mauve$2,
847
866
  mellowApricot,
848
- emerald,
849
- vodka,
850
- vermilion,
851
- deepSaffron,
867
+ nightBlue,
868
+ pastelRed,
852
869
  pineGreen,
853
- ultramarineBlue,
854
- sonicSilver,
855
- linen,
870
+ royalBlue: royalBlue$1,
871
+ scarletGum: scarletGum$1,
856
872
  seashell,
857
- honeydew,
858
- aliceBlue,
859
- antiFlashWhite,
860
- apple: apple$1
873
+ silverChalice,
874
+ sonicSilver,
875
+ ultramarineBlue,
876
+ vermilion,
877
+ violet: violet$2,
878
+ violet1: violet1$1,
879
+ vodka
861
880
  } = colorScales;
862
881
  const palette$5 = {
863
882
  black: '#000000',
@@ -874,11 +893,17 @@ const palette$5 = {
874
893
  maasstrichtBlueLight30: maasstrichtBlue.lighten30,
875
894
  maasstrichtBlue: maasstrichtBlue.base,
876
895
  pastelRed: pastelRed.base,
896
+ pastelRedLight20: pastelRed.lighten20,
877
897
  mellowApricot: mellowApricot.base,
898
+ mellowApricotLight20: mellowApricot.lighten20,
878
899
  emerald: emerald.base,
900
+ emeraldLight20: emerald.lighten20,
901
+ emeraldDark20: emerald.darken20,
879
902
  vodka: vodka.base,
903
+ vodkaLight20: vodka.lighten20,
880
904
  vermilion: vermilion.base,
881
905
  deepSaffron: deepSaffron.base,
906
+ deepSaffronDark20: deepSaffron.darken20,
882
907
  pineGreen: pineGreen.base,
883
908
  ultramarineBlue: ultramarineBlue.base,
884
909
  sonicSilver: sonicSilver.base,
@@ -887,7 +912,20 @@ const palette$5 = {
887
912
  honeydew: honeydew.base,
888
913
  aliceBlue: aliceBlue.base,
889
914
  antiFlashWhite: antiFlashWhite.base,
890
- apple: apple$1.base
915
+ apple: apple$1.base,
916
+ currant: currant$1.base,
917
+ nightBlue: nightBlue.base,
918
+ darkBlue: darkBlue.base,
919
+ royalBlue: royalBlue$1.base,
920
+ royalBlueDark20: royalBlue$1.darken20,
921
+ goldDark40: gold$1.darken40,
922
+ mauve: mauve$2.base,
923
+ violet: violet$2.base,
924
+ violetLight30: violet$2.lighten30,
925
+ violet1: violet1$1.base,
926
+ scarletGum: scarletGum$1.base,
927
+ silverChalice: silverChalice.base,
928
+ silverChaliceLight20: silverChalice.lighten20
891
929
  };
892
930
 
893
931
  const {
@@ -973,4 +1011,4 @@ const palette = Object.assign(Object.assign({}, palette$5), {
973
1011
  violetLight90: violet.lighten90
974
1012
  });
975
1013
 
976
- export { colorScales, palette$6 as default, palette$5 as defaultMobilePalette, palette$6 as defaultWebPalette, palette$4 as eBensPalette, palette$3 as jobsPalette, palette$2 as swagPalette, palette$1 as walletPalette, palette as workPalette };
1014
+ export { colorScales, palette$6 as default, palette$5 as defaultMobilePalette, palette$6 as defaultWebPalette, palette$4 as eBensPalette, palette$3 as jobsPalette, mixColor, palette$2 as swagPalette, palette$1 as walletPalette, palette as workPalette };
package/lib/index.js CHANGED
@@ -689,59 +689,68 @@ Values.VERSION = 'v2.1.1';
689
689
 
690
690
  var Values$1 = Values;
691
691
 
692
- const STEPS = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95];
692
+ const mixColor = color => {
693
+ const colorValues = new Values$1(color);
694
+ return {
695
+ tint: step => colorValues.tint(step).hexString(),
696
+ shade: step => colorValues.shade(step).hexString(),
697
+ base: colorValues.hexString()
698
+ };
699
+ };
693
700
 
701
+ const STEPS = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95];
694
702
  const createColorScales = base => {
695
- const colorValues = new Values$1(base);
703
+ const mixed = mixColor(base);
696
704
  return Object.assign(Object.assign({}, STEPS.reduce((acc, step) => Object.assign(Object.assign({}, acc), {
697
- [`lighten${step}`]: colorValues.tint(step).hexString(),
698
- [`darken${step}`]: colorValues.shade(step).hexString()
705
+ [`lighten${step}`]: mixed.tint(step),
706
+ [`darken${step}`]: mixed.shade(step)
699
707
  }), {})), {
700
- base: colorValues.hexString()
708
+ base: mixed.base
701
709
  });
702
710
  };
703
711
 
704
712
  const BASE_COLORS = {
713
+ aliceBlue: '#ecf0ff',
705
714
  antiFlashWhite: '#f1f2f3',
706
- blue: '#1dbeee',
715
+ apple: '#e3602a',
707
716
  blue1: '#5a68e2',
708
- nightBlue: '#353957',
717
+ blue: '#1dbeee',
718
+ cornflowerBlue: '#5d80f0',
719
+ currant: '#48000a',
709
720
  darkBlue: '#25006e',
710
- maasstrichtBlue: '#001f23',
711
- ultramarineBlue: '#4568fb',
712
- royalBlue: '#5a68e2',
721
+ deepSaffron: '#ffa234',
722
+ emerald: '#5ace7d',
713
723
  frenchSky: '#8999ff',
714
- aliceBlue: '#ecf0ff',
715
- jordyBlue: '#92abfc',
716
- cornflowerBlue: '#5d80f0',
717
- paua: '#130066',
724
+ gold: '#ffd500',
718
725
  green: '#01b39c',
719
- emerald: '#5ace7d',
720
- pineGreen: '#017d6d',
721
- honeydew: '#f0fef4',
722
726
  grey: '#a3a6ac',
723
- currant: '#48000a',
724
- sonicSilver: '#737479',
725
727
  grotesqueGreen: '#6af293',
728
+ hitPink: '#ffad79',
729
+ honeydew: '#f0fef4',
730
+ jordyBlue: '#92abfc',
731
+ linen: '#fcebe7',
732
+ maasstrichtBlue: '#001f23',
733
+ mauve: '#c38cee',
726
734
  mellowApricot: '#ffbe71',
727
- deepSaffron: '#ffa234',
735
+ nightBlue: '#353957',
736
+ pastelRed: '#f46363',
737
+ paua: '#130066',
738
+ peach: '#f8ac7d',
739
+ pineGreen: '#017d6d',
728
740
  pink: '#fe56aa',
729
- hitPink: '#ffad79',
730
- apple: '#e3602a',
731
741
  purple: '#be83cf',
742
+ royalBlue: '#5a68e2',
732
743
  scarletGum: '#401960',
733
- vodka: '#b5c3fd',
734
- peach: '#f8ac7d',
735
- pastelRed: '#f46363',
736
- vermilion: '#de350b',
737
- linen: '#fcebe7',
744
+ seashell: '#fff6eb',
745
+ silverChalice: '#abacaf',
738
746
  smalt: '#003580',
739
- violet: '#7622d7',
747
+ sonicSilver: '#737479',
748
+ ultramarineBlue: '#4568fb',
749
+ vermilion: '#de350b',
740
750
  violet1: '#8505a2',
741
- mauve: '#c38cee',
742
- yellow: '#fadb14',
743
- seashell: '#fff6eb',
744
- gold: '#ffd500'
751
+ violet: '#7622d7',
752
+ vodka: '#b5c3fd',
753
+ yellow: '#fadb14'
745
754
  };
746
755
  const colorScales = Object.entries(BASE_COLORS).reduce((acc, [key, value]) => Object.assign(Object.assign({}, acc), {
747
756
  [key]: createColorScales(value)
@@ -758,7 +767,7 @@ const {
758
767
  purple,
759
768
  vermilion: vermilion$1,
760
769
  smalt,
761
- violet: violet$2,
770
+ violet: violet$3,
762
771
  yellow
763
772
  } = colorScales;
764
773
  const palette$6 = {
@@ -832,15 +841,15 @@ const palette$6 = {
832
841
  smaltLight45: smalt.lighten45,
833
842
  smaltLight75: smalt.lighten75,
834
843
  smaltLight90: smalt.lighten90,
835
- violet: violet$2.base,
836
- violetDark15: violet$2.darken15,
837
- violetDark30: violet$2.darken30,
838
- violetDark45: violet$2.darken45,
839
- violetDark75: violet$2.darken75,
840
- violetLight30: violet$2.lighten30,
841
- violetLight60: violet$2.lighten60,
842
- violetLight75: violet$2.lighten75,
843
- violetLight90: violet$2.lighten90,
844
+ violet: violet$3.base,
845
+ violetDark15: violet$3.darken15,
846
+ violetDark30: violet$3.darken30,
847
+ violetDark45: violet$3.darken45,
848
+ violetDark75: violet$3.darken75,
849
+ violetLight30: violet$3.lighten30,
850
+ violetLight60: violet$3.lighten60,
851
+ violetLight75: violet$3.lighten75,
852
+ violetLight90: violet$3.lighten90,
844
853
  yellow: yellow.base,
845
854
  yellowDark15: yellow.darken15,
846
855
  yellowDark75: yellow.darken75,
@@ -849,23 +858,33 @@ const palette$6 = {
849
858
  };
850
859
 
851
860
  const {
852
- maasstrichtBlue,
861
+ aliceBlue,
862
+ antiFlashWhite,
863
+ apple: apple$1,
864
+ currant: currant$1,
865
+ darkBlue,
866
+ deepSaffron,
867
+ emerald,
868
+ gold: gold$1,
853
869
  grey,
854
- pastelRed,
870
+ honeydew,
871
+ linen,
872
+ maasstrichtBlue,
873
+ mauve: mauve$2,
855
874
  mellowApricot,
856
- emerald,
857
- vodka,
858
- vermilion,
859
- deepSaffron,
875
+ nightBlue,
876
+ pastelRed,
860
877
  pineGreen,
861
- ultramarineBlue,
862
- sonicSilver,
863
- linen,
878
+ royalBlue: royalBlue$1,
879
+ scarletGum: scarletGum$1,
864
880
  seashell,
865
- honeydew,
866
- aliceBlue,
867
- antiFlashWhite,
868
- apple: apple$1
881
+ silverChalice,
882
+ sonicSilver,
883
+ ultramarineBlue,
884
+ vermilion,
885
+ violet: violet$2,
886
+ violet1: violet1$1,
887
+ vodka
869
888
  } = colorScales;
870
889
  const palette$5 = {
871
890
  black: '#000000',
@@ -882,11 +901,17 @@ const palette$5 = {
882
901
  maasstrichtBlueLight30: maasstrichtBlue.lighten30,
883
902
  maasstrichtBlue: maasstrichtBlue.base,
884
903
  pastelRed: pastelRed.base,
904
+ pastelRedLight20: pastelRed.lighten20,
885
905
  mellowApricot: mellowApricot.base,
906
+ mellowApricotLight20: mellowApricot.lighten20,
886
907
  emerald: emerald.base,
908
+ emeraldLight20: emerald.lighten20,
909
+ emeraldDark20: emerald.darken20,
887
910
  vodka: vodka.base,
911
+ vodkaLight20: vodka.lighten20,
888
912
  vermilion: vermilion.base,
889
913
  deepSaffron: deepSaffron.base,
914
+ deepSaffronDark20: deepSaffron.darken20,
890
915
  pineGreen: pineGreen.base,
891
916
  ultramarineBlue: ultramarineBlue.base,
892
917
  sonicSilver: sonicSilver.base,
@@ -895,7 +920,20 @@ const palette$5 = {
895
920
  honeydew: honeydew.base,
896
921
  aliceBlue: aliceBlue.base,
897
922
  antiFlashWhite: antiFlashWhite.base,
898
- apple: apple$1.base
923
+ apple: apple$1.base,
924
+ currant: currant$1.base,
925
+ nightBlue: nightBlue.base,
926
+ darkBlue: darkBlue.base,
927
+ royalBlue: royalBlue$1.base,
928
+ royalBlueDark20: royalBlue$1.darken20,
929
+ goldDark40: gold$1.darken40,
930
+ mauve: mauve$2.base,
931
+ violet: violet$2.base,
932
+ violetLight30: violet$2.lighten30,
933
+ violet1: violet1$1.base,
934
+ scarletGum: scarletGum$1.base,
935
+ silverChalice: silverChalice.base,
936
+ silverChaliceLight20: silverChalice.lighten20
899
937
  };
900
938
 
901
939
  const {
@@ -987,6 +1025,7 @@ exports.defaultMobilePalette = palette$5;
987
1025
  exports.defaultWebPalette = palette$6;
988
1026
  exports.eBensPalette = palette$4;
989
1027
  exports.jobsPalette = palette$3;
1028
+ exports.mixColor = mixColor;
990
1029
  exports.swagPalette = palette$2;
991
1030
  exports.walletPalette = palette$1;
992
1031
  exports.workPalette = palette;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/colors",
3
- "version": "7.25.1",
3
+ "version": "7.27.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -23,8 +23,8 @@
23
23
  "@rollup/plugin-commonjs": "^20.0.0",
24
24
  "@rollup/plugin-node-resolve": "^13.1.3",
25
25
  "@rollup/plugin-typescript": "^8.3.1",
26
- "eslint-config-hd": "7.25.1",
27
- "prettier-config-hd": "7.25.1",
26
+ "eslint-config-hd": "7.27.0",
27
+ "prettier-config-hd": "7.27.0",
28
28
  "rollup": "^2.70.1"
29
29
  },
30
30
  "prettier": "prettier-config-hd"
@@ -1,4 +1,4 @@
1
- import Values from 'values.js';
1
+ import mixColor from './mixColor';
2
2
 
3
3
  const STEPS = [
4
4
  5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,
@@ -13,18 +13,18 @@ type ColorScales = { base: string } & {
13
13
  };
14
14
 
15
15
  const createColorScales = (base: string): ColorScales => {
16
- const colorValues = new Values(base);
16
+ const mixed = mixColor(base);
17
17
 
18
18
  return {
19
19
  ...STEPS.reduce(
20
20
  (acc, step) => ({
21
21
  ...acc,
22
- [`lighten${step}`]: colorValues.tint(step).hexString(),
23
- [`darken${step}`]: colorValues.shade(step).hexString(),
22
+ [`lighten${step}`]: mixed.tint(step),
23
+ [`darken${step}`]: mixed.shade(step),
24
24
  }),
25
25
  {} as Omit<ColorScales, 'base'>
26
26
  ),
27
- base: colorValues.hexString(),
27
+ base: mixed.base,
28
28
  };
29
29
  };
30
30
 
@@ -1,46 +1,48 @@
1
1
  import createColorScales from './createColorScales';
2
+ import mixColor from './mixColor';
2
3
 
3
4
  const BASE_COLORS = {
5
+ aliceBlue: '#ecf0ff',
4
6
  antiFlashWhite: '#f1f2f3',
5
- blue: '#1dbeee',
7
+ apple: '#e3602a',
6
8
  blue1: '#5a68e2',
7
- nightBlue: '#353957',
9
+ blue: '#1dbeee',
10
+ cornflowerBlue: '#5d80f0',
11
+ currant: '#48000a',
8
12
  darkBlue: '#25006e',
9
- maasstrichtBlue: '#001f23',
10
- ultramarineBlue: '#4568fb',
11
- royalBlue: '#5a68e2',
13
+ deepSaffron: '#ffa234',
14
+ emerald: '#5ace7d',
12
15
  frenchSky: '#8999ff',
13
- aliceBlue: '#ecf0ff',
14
- jordyBlue: '#92abfc',
15
- cornflowerBlue: '#5d80f0',
16
- paua: '#130066',
16
+ gold: '#ffd500',
17
17
  green: '#01b39c',
18
- emerald: '#5ace7d',
19
- pineGreen: '#017d6d',
20
- honeydew: '#f0fef4',
21
18
  grey: '#a3a6ac',
22
- currant: '#48000a',
23
- sonicSilver: '#737479',
24
19
  grotesqueGreen: '#6af293',
20
+ hitPink: '#ffad79',
21
+ honeydew: '#f0fef4',
22
+ jordyBlue: '#92abfc',
23
+ linen: '#fcebe7',
24
+ maasstrichtBlue: '#001f23',
25
+ mauve: '#c38cee',
25
26
  mellowApricot: '#ffbe71',
26
- deepSaffron: '#ffa234',
27
+ nightBlue: '#353957',
28
+ pastelRed: '#f46363',
29
+ paua: '#130066',
30
+ peach: '#f8ac7d',
31
+ pineGreen: '#017d6d',
27
32
  pink: '#fe56aa',
28
- hitPink: '#ffad79',
29
- apple: '#e3602a',
30
33
  purple: '#be83cf',
34
+ royalBlue: '#5a68e2',
31
35
  scarletGum: '#401960',
32
- vodka: '#b5c3fd',
33
- peach: '#f8ac7d',
34
- pastelRed: '#f46363',
35
- vermilion: '#de350b',
36
- linen: '#fcebe7',
36
+ seashell: '#fff6eb',
37
+ silverChalice: '#abacaf',
37
38
  smalt: '#003580',
38
- violet: '#7622d7',
39
+ sonicSilver: '#737479',
40
+ ultramarineBlue: '#4568fb',
41
+ vermilion: '#de350b',
39
42
  violet1: '#8505a2',
40
- mauve: '#c38cee',
43
+ violet: '#7622d7',
44
+ vodka: '#b5c3fd',
41
45
  yellow: '#fadb14',
42
- seashell: '#fff6eb',
43
- gold: '#ffd500',
44
46
  } as const;
45
47
 
46
48
  const colorScales = Object.entries(BASE_COLORS).reduce(
@@ -48,4 +50,6 @@ const colorScales = Object.entries(BASE_COLORS).reduce(
48
50
  {} as Record<keyof typeof BASE_COLORS, ReturnType<typeof createColorScales>>
49
51
  );
50
52
 
53
+ export { mixColor };
54
+
51
55
  export default colorScales;
@@ -0,0 +1,12 @@
1
+ import Values from 'values.js';
2
+
3
+ const mixColor = (color: string) => {
4
+ const colorValues = new Values(color);
5
+ return {
6
+ tint: (step: number) => colorValues.tint(step).hexString(),
7
+ shade: (step: number) => colorValues.shade(step).hexString(),
8
+ base: colorValues.hexString(),
9
+ };
10
+ };
11
+
12
+ export default mixColor;
@@ -1,23 +1,33 @@
1
1
  import colorScales from '../colorScales';
2
2
 
3
3
  const {
4
- maasstrichtBlue,
4
+ aliceBlue,
5
+ antiFlashWhite,
6
+ apple,
7
+ currant,
8
+ darkBlue,
9
+ deepSaffron,
10
+ emerald,
11
+ gold,
5
12
  grey,
6
- pastelRed,
13
+ honeydew,
14
+ linen,
15
+ maasstrichtBlue,
16
+ mauve,
7
17
  mellowApricot,
8
- emerald,
9
- vodka,
10
- vermilion,
11
- deepSaffron,
18
+ nightBlue,
19
+ pastelRed,
12
20
  pineGreen,
13
- ultramarineBlue,
14
- sonicSilver,
15
- linen,
21
+ royalBlue,
22
+ scarletGum,
16
23
  seashell,
17
- honeydew,
18
- aliceBlue,
19
- antiFlashWhite,
20
- apple,
24
+ silverChalice,
25
+ sonicSilver,
26
+ ultramarineBlue,
27
+ vermilion,
28
+ violet,
29
+ violet1,
30
+ vodka,
21
31
  } = colorScales;
22
32
 
23
33
  const palette = {
@@ -38,11 +48,23 @@ const palette = {
38
48
  maasstrichtBlue: maasstrichtBlue.base,
39
49
 
40
50
  pastelRed: pastelRed.base,
51
+ pastelRedLight20: pastelRed.lighten20,
52
+
41
53
  mellowApricot: mellowApricot.base,
54
+ mellowApricotLight20: mellowApricot.lighten20,
55
+
42
56
  emerald: emerald.base,
57
+ emeraldLight20: emerald.lighten20,
58
+ emeraldDark20: emerald.darken20,
59
+
43
60
  vodka: vodka.base,
61
+ vodkaLight20: vodka.lighten20,
62
+
44
63
  vermilion: vermilion.base,
64
+
45
65
  deepSaffron: deepSaffron.base,
66
+ deepSaffronDark20: deepSaffron.darken20,
67
+
46
68
  pineGreen: pineGreen.base,
47
69
  ultramarineBlue: ultramarineBlue.base,
48
70
  sonicSilver: sonicSilver.base,
@@ -52,6 +74,25 @@ const palette = {
52
74
  aliceBlue: aliceBlue.base,
53
75
  antiFlashWhite: antiFlashWhite.base,
54
76
  apple: apple.base,
77
+ currant: currant.base,
78
+ nightBlue: nightBlue.base,
79
+ darkBlue: darkBlue.base,
80
+
81
+ royalBlue: royalBlue.base,
82
+ royalBlueDark20: royalBlue.darken20,
83
+
84
+ goldDark40: gold.darken40,
85
+
86
+ mauve: mauve.base,
87
+
88
+ violet: violet.base,
89
+ violetLight30: violet.lighten30,
90
+ violet1: violet1.base,
91
+
92
+ scarletGum: scarletGum.base,
93
+
94
+ silverChalice: silverChalice.base,
95
+ silverChaliceLight20: silverChalice.lighten20,
55
96
  };
56
97
 
57
98
  export default palette;