Skip to content

Commit

Permalink
fixes a type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
erikyo committed Dec 24, 2023
1 parent 4ea4b42 commit 1304682
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hex-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { COLORSTRING, RGBVALUE } from "./types";
import { COLORSTRING, HEX, RGBVALUE } from "./types";

/**
* It returns an object with the hex values of the 3 digit hex color
Expand Down Expand Up @@ -76,7 +76,7 @@ export function toHex(int8: number): string {
*
* @return {string} the hex string
*/
export function valuesToHex(rgb: RGBVALUE): string {
export function valuesToHex(rgb: RGBVALUE): HEX {
// Extract the RGB values from the hex string
if (typeof rgb?.r === "number" && typeof rgb?.g === "number" && typeof rgb?.b === "number") {
return `#${toHex(rgb?.r)}${toHex(rgb?.g)}${toHex(rgb?.b)}`;
Expand Down

0 comments on commit 1304682

Please sign in to comment.