An ATproto social media client -- with an independent Appview.
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: update jsdoc with correct type

serenity 48ce4c20 1462e156

+6 -6
+6 -6
src/alf/util/colors/conversion.ts
··· 1 1 import {type HexCode, type HslColor, type RgbColor} from '#/alf/util/colors' 2 2 3 3 /** 4 - * Converts a hexcode string in the format `"#RRGGBB"` to a `HslColor` object (`{ h: number, s: number, l: number }`). 4 + * Converts a hexcode string in the format `"#RRGGBB"` to a `HslColor` object (`{ h: number, s: number, l: number, a: number}`). 5 5 * @param {HexCode} hex - A hexcode string in the format `#RRGGBB`. The leading "#" symbol is optional. 6 6 * @returns{HslColor} A HSL colour object. 7 7 */ ··· 51 51 } 52 52 53 53 /** 54 - * Converts a `HslColor` object (`{ h: number, s: number, l: number }`) to a hexcode string in the format `"#RRGGBB"`. 54 + * Converts a `HslColor` object (`{ h: number, s: number, l: number, a: number }`) to a hexcode string in the format `"#RRGGBB"`. 55 55 * @param {HslColor} hsl - A HSL colour object. 56 56 * @param {boolean} appendSymbol - Whether to append "#" to the start of the hex string. Defaults to true. 57 57 * @returns {HexCode} A hexcode string in the format `"#RRGGBB"`. The leading "#" symbol is optional. ··· 97 97 } 98 98 99 99 /** 100 - * Converts an `RgbColor` object (`{ r: number, g: number, b: number }`) to a hexcode string in the format `"#RRGGBB"`. 100 + * Converts an `RgbColor` object (`{ r: number, g: number, b: number, a: number }`) to a hexcode string in the format `"#RRGGBB"`. 101 101 * @param {RgbColor} rgb - An RGB colour object. 102 102 * @param {boolean} appendSymbol - Whether to append "#" to the start of the hex string. Defaults to true. 103 103 * @returns {HexCode} A hexcode string in the format `"#RRGGBB"`. The leading "#" symbol is optional. ··· 110 110 } 111 111 112 112 /** 113 - * Converts a hexcode string in the format `"#RRGGBB"` to an `RgbColor` object (`{ r: number, g: number, b: number }`). 113 + * Converts a hexcode string in the format `"#RRGGBB"` to an `RgbColor` object (`{ r: number, g: number, b: number, a: number }`). 114 114 * @param {HexCode} hex - A hexcode string in the format `#RRGGBB`. The leading "#" symbol is optional. 115 115 * @returns {RgbColor} An RGB colour object. 116 116 */ ··· 124 124 } 125 125 126 126 /** 127 - * Converts an `RgbColor` object (`{ r: number, g: number, b: number }`) to a `HslColor` object (`{ h: number, s: number, l: number }`) 127 + * Converts an `RgbColor` object (`{ r: number, g: number, b: number, a: number }`) to a `HslColor` object (`{ h: number, s: number, l: number, a: number }`) 128 128 * @param {RgbColor} - An RGB colour object. 129 129 * @returns {HslColor} A HSL colour object. 130 130 */ ··· 170 170 } 171 171 172 172 /** 173 - * Converts a `HslColor` object (`{ h: number, s: number, l: number }`) to a `RgbColor` object (`{ r: number, g: number, b: number }`) 173 + * Converts a `HslColor` object (`{ h: number, s: number, l: number, a: number }`) to a `RgbColor` object (`{ r: number, g: number, b: number, a: number }`) 174 174 * @param {HslColor} - A HSL colour object. 175 175 * @returns {RgbColor} An RGB colour object. 176 176 */