Skip to content

Commit

Permalink
feat: Update return type in hexAlphaToHsla function
Browse files Browse the repository at this point in the history
The return type of the hexAlphaToHsla function has been updated. It can now return either a string or an object containing HSLA color components. This offers extended flexibility for developers using the function to handle different data types.
  • Loading branch information
mallikcheripally committed Jun 6, 2024
1 parent 0060901 commit d77e0ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/conversions/hexAlphaToHsla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {isValidHexAlpha} from "@/validations/isValidHexAlpha";
*
* @param {string} hex - The HEX color string with alpha (e.g., #RRGGBBAA or #RGBA).
* @param {boolean} [asString=true] - Whether to return the result as a string.
* @returns {{ h: number; s: number; l: number; a: number; }} - The HSLA color components.
* @returns {string | { h: number; s: number; l: number; a: number; }} - The HSLA color components.
* @throws {Error} - Throws an error if the input color format is invalid.
*/
export function hexAlphaToHsla(hex: string, asString?: true): string;
Expand Down

0 comments on commit d77e0ed

Please sign in to comment.