diff options
| author | Omkar Pednekar <[email protected]> | 2023-09-17 14:14:54 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-17 10:44:54 +0200 |
| commit | a7d25fa6224c686bca8b21cb7961910362008ffb (patch) | |
| tree | 1f7d4102544448db14aa55001e191ba321252c45 /src/modules | |
| parent | 82b779da5e87fddd7b5a5564b7228ac54b44d349 (diff) | |
| download | faker-a7d25fa6224c686bca8b21cb7961910362008ffb.tar.xz faker-a7d25fa6224c686bca8b21cb7961910362008ffb.zip | |
fix(image): dataUri is not random (#2316)
Co-authored-by: ST-DDT <[email protected]>
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/image/index.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/image/index.ts b/src/modules/image/index.ts index bec9e98c..a93f181e 100644 --- a/src/modules/image/index.ts +++ b/src/modules/image/index.ts @@ -353,7 +353,7 @@ export class ImageModule { * @param options Options for generating a data uri. * @param options.width The width of the image. Defaults to `640`. * @param options.height The height of the image. Defaults to `480`. - * @param options.color The color of the image. Defaults to `grey`. + * @param options.color The color of the image. Must be a color supported by svg. Defaults to a random color. * @param options.type The type of the image. Defaults to `'svg-uri'`. * * @example @@ -377,9 +377,9 @@ export class ImageModule { */ height?: number; /** - * The color of the image. + * The color of the image. Must be a color supported by svg. * - * @default 'grey' + * @default faker.color.rgb() */ color?: string; /** @@ -394,7 +394,7 @@ export class ImageModule { const { width = 640, height = 480, - color = 'grey', + color = this.faker.color.rgb(), type = 'svg-uri', } = options; |
