sass-apca 1.0.1 → 1.0.2

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 (2) hide show
  1. package/apca.scss +9 -0
  2. package/package.json +1 -1
package/apca.scss CHANGED
@@ -62,6 +62,15 @@ $_blueMultiplier: 0.072175;
62
62
  }
63
63
  }
64
64
 
65
+ /**
66
+ * Determine the lightness contrast of a given text and background color using the
67
+ * APC algorithm
68
+ *
69
+ * @param {color} $textColor Text color
70
+ * @param {color} $backgroundColor Background color
71
+ *
72
+ * @return {number} A number between -108 and 107 representing the lightness contrast
73
+ */
65
74
  @function contrast($textColor, $backgroundColor) {
66
75
  @if (meta.type-of($textColor) != 'color') {
67
76
  @error "Type Error: apca.contrast expects a color as first argument but received #{meta.type-of($textColor)}. Please provide a valid color.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sass-apca",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Sass implementation of the [Accessible Perceptual Contrast Algorithm (APCA)](https://git.apcacontrast.com/) for the WCAG 3.0 specification.",
5
5
  "keywords": [
6
6
  "sass",