summaryrefslogtreecommitdiff
path: root/ext/js/app/theme-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-05-20 10:28:38 -0400
committerGitHub <noreply@github.com>2022-05-20 10:28:38 -0400
commit31e20c889e467aa4ba64b0b5baf602adc1359371 (patch)
treea033db935a817b2d407ec20843176610a87a6e16 /ext/js/app/theme-controller.js
parentae0ad227c0fd293609a21e5cc1d2a4b85fe7c520 (diff)
ESlint JSdoc (#2148)
* Install eslint-plugin-jsdoc * Initial rules setup * Update lists * Use @returns rather than @return * Remove error throwing code which is never executed * Fix issues relating to @throws * General error fixes * Update Display type documentation * Various doc fixes * Fix invalid tuple syntax * Doc updates * Remove unused * Doc updates * Enable jsdoc/require-returns * Update rules * Update remaining rules
Diffstat (limited to 'ext/js/app/theme-controller.js')
-rw-r--r--ext/js/app/theme-controller.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/app/theme-controller.js b/ext/js/app/theme-controller.js
index 4ee82c52..6a95e2d7 100644
--- a/ext/js/app/theme-controller.js
+++ b/ext/js/app/theme-controller.js
@@ -174,7 +174,7 @@ class ThemeController {
/**
* Adds the value of a CSS color to an accumulation target.
- * @param {[number, number, number]} target The target color buffer to accumulate into.
+ * @param {number[]} target The target color buffer to accumulate into, as an array of [r, g, b].
* @param {string|*} cssColor The CSS color value to add to the target. If this value is not a string,
* the target will not be modified.
*/
@@ -196,7 +196,7 @@ class ThemeController {
/**
* Decomposes a CSS color string into its RGBA values.
* @param {string} cssColor The color value to decompose. This value is expected to be in the form RGB(r, g, b) or RGBA(r, g, b, a).
- * @returns {?[number, number, number, number]} The color and alpha values. The color component values range from [0, 255], and the alpha ranges from [0, 1].
+ * @returns {?number[]} The color and alpha values as [r, g, b, a]. The color component values range from [0, 255], and the alpha ranges from [0, 1].
*/
_getColorInfo(cssColor) {
const m = /^\s*rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)\s*$/.exec(cssColor);